age calculation
1 # one method 2 def age 3 ((Time.now - birthday)/(60*60*24)/365.2422).to_i 4 end 5 6 # second method 7 def birthday 8 @birthday = Time.local( birth_year, birth_month, birth_day ) 9 end 10 11 def age 12 ((Time.now - birthday) / 1.year).to_i 13 end
ekbjzmuw — 19 October / 23:13