0

Possible Duplicate:
Calculate age in JavaScript

Suppose I have a string of the form Apr 1928, and I want to get the age of this person (84 in this case). It's okay if I'm one year off in the special case where the current month is that one and it's unclear which day they were born. What would be the simplest, most elegant way to get the person's age?

Community
  • 1
  • 1
Ben G
  • 26,091
  • 34
  • 103
  • 170
  • I think it would be subtraction. What did you try, we are not your code mill. – epascarello Sep 06 '12 at 21:09
  • Possible duplicate of http://stackoverflow.com/questions/4060004/calculate-age-in-javascript and http://stackoverflow.com/questions/10008050/get-age-from-birthdate – jeremy Sep 06 '12 at 21:09
  • Thanks Nile, it should be possible to figure out based on that answer. Voting to self-close – Ben G Sep 06 '12 at 21:11

0 Answers0