Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Answer: How do I determine if a given year is a leap year?

by MidLifeXis (Monsignor)
on Jan 10, 2011 at 14:45 UTC ( [id://881476]=note: print w/replies, xml ) Need Help??


in reply to Re: How do I determine if a given year is a leap year?
in thread How do I determine if a given year is a leap year?

I must not have had sufficient coffee in my bloodstream when reading this, as the first few times I read through it I stumbled on overlooked the fact that % returns a false value when the year is appropriately divisible. Thanks to Corion for smacking me with a the clue-by-four of understanding.

As moritz stated in the CB, think of it as foo() if (($a % X) == 0)

Posted to hasten others to the "oh yeah" moment.

--MidLifeXis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 13:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found