[Javascript] Is integer?

tedd tedd at sperling.com
Mon May 29 12:50:06 CDT 2006


At 10:16 AM -0400 5/29/06, John Warner wrote:
>A leap year is any year that can be divided evenly by 4 (year % 4 = 0)
>but years ending in 00 (2000, 1900, 2100) must  (00Year % 400 = 0) so
>2000 is a leap year, 2100 is NOT even though it can be divided by 4, but
>not 400.
>
>John Warner

John:

Not to disagree, but more simply.

A leap year is IF the year is evenly divisible by 4 AND is not the 
"turn of the century". IF it is a "turn of the century" year, then it 
must also be evenly divisible by 400.

tedd

PS: Did you know that this year (2006) we even added a leap second -- 
you don't even want to know the computations for that.
-- 
------------------------------------------------------------------------------------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the Javascript mailing list