Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to...? Convert Date of Birth to Age

From: pwoodward:cncdsl at: 3-Jul-2002 10:13

Hey - why not use the follow approximation: birthdate: day-month-year today: now/date daysold: today - birthdate yearsold: to-integer daysold / 365.2425 Since to-integer always rounds down, you end up with an a relatively accurate age. REBOL seems to be pretty good about date arithmetic (accounting for leap years). I haven't tested the above that extensively, but it's come up roses for friends and family. - Porter