Find age of person


/ Published in: Ruby
Save to your folder(s)



Copy this code and paste it in your HTML
  1. def age
  2. ((Time.now - birthday)/(60*60*24)/365.2422).to_i
  3. end

Report this snippet


Comments


You need to login to view comments.