Problems? Is your data what you think it is? | |
PerlMonks |
RE: RE: Calculating a persons age based on their birthday.by Adam (Vicar) |
on May 03, 2000 at 20:52 UTC ( [id://10124]=note: print w/replies, xml ) | Need Help?? |
If you want to be slightly more accurate (not that this matters for another 100 years, but hey!) the leap year formula is that a leap year is divisable by 4, but not 100 (except if divisable by 400). Of course, the amount of error induced by leap years wouldn't effect your program unless the person was over a thousand years old (one day of error every four years would take a long time to become relevant), otherwise its safe to just div by 365. Article about leap years.
In Section
Seekers of Perl Wisdom
|
|