Wednesday, February 29, 2012

Happy Leap Day

This February has an extra day this year because it is divisible by 4. Waita minute, years that are evenly divisible by 100 are not leap years, unless they are also evenly divisible by 400, in which case they are leap years. [See here]

Relax, even if you have a bug in some isLeapYear code it is not likely it will come back to haunt you. You probably won't be here to fix it in 100 years. As long as you get mod 4 = 0 you are good.

Even with 29 days, it is still fewer days than other months of the year. Yes, this isn't really fair for February. But we are so used to this system and it is here to stay.

No comments: