in reply to RE: RE: Re: Calculating a persons age based on their birthday.
in thread Calculating a persons age based on their birthday.
The above code is what I'd recommend using, as it's simple
enough that the use of modules isn't really needed.. Then
again I'm not a module-nazi:) One caveat about this code
though: The value returned to $month in the call to
localtime is 0 based, i.e. 0..11. I'm not sure if this
might contrast the format of the $birth_month that is
being passed in.. if so, just change the appropriate line
to read
$age-- unless sprintf("%02d%02d", $month+1, $day)
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: RE: RE: RE: Re: Calculating a persons age based on their birthday.
by turnstep (Parson) on May 03, 2000 at 04:37 UTC | |
by takshaka (Friar) on May 03, 2000 at 08:41 UTC |
In Section
Seekers of Perl Wisdom