Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

RE: RE: Re: Calculating a persons age based on their birthday.

by t0mas (Priest)
on May 03, 2000 at 14:43 UTC ( [id://10072]=note: print w/replies, xml ) Need Help??


in reply to RE: Re: Calculating a persons age based on their birthday.
in thread Calculating a persons age based on their birthday.

Sorry - It should be
if ((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400) == 0) {$ +nod=$nod-366} else {$nod=$nod-365}; #check for the leap year.
365 and 366 swiched places....

Replies are listed 'Best First'.
RE: RE: RE: Re: Calculating a persons age based on their birthday.
by Maqs (Deacon) on May 03, 2000 at 15:15 UTC
    don't think so. The check might be simple. if $year % 4 gives any result except '0'
    then this is not a leap year. there is nothing else to check out, IMHO.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://10072]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-19 01:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found