<$BlogRSDURL$>

Sunday, February 29, 2004

Leap Day 

Leap year comes roughly every four years. Today is the extra day added
to leap years, February 29th. The reason for leap year is that a year
is
about a quarter day longer than 365 days. Not exactly a quarter day,
but almost.



To compensate for the "almost" part, a complex formula was introduced
to determine in which years to add an extra day.
It goes like this ("mod" stands for the modulo function, which is the
remainder after dividing two integers):



if ((year mod 4) = 0) and ((year
mod 100) <> 0) then


   leap year

else if ((year mod 400) = 0) then

   leap year

end if





The idea here is that years evenly divisible by 4 are leap years as
long as they are not also evenly divisible by 100, unless they are also
evenly divisible by 400.



So the year 2000 was a leap year even though it was evenly divisible by
100, because it was also evenly divisible by 400. This is an unusual
occurrence. The years 1900, 1800, and 1700 were not leap years. They
were not evenly divisible by 400, but were evenly divisible by 100.



You can read more about leap year by href="http://www.google.com/search?q=leap+year">searching Google.
Comments: Post a Comment