2012 is a leap year, which makes tomorrow leap day. February 29. You remember the mnemonic:
- Thirty days hath September;
- April, June, and November;
- All the rest have thirty-one,
- Save February, with twenty-eight days clear,
- And twenty-nine each leap year.
Looking for something Berkeleyish to say about the calendar quirk, I found this buried in a readme file concerning a homework assignment for CS 61B, a course on Data Structure. The professor informed students that:
The Unix "cal" command will remind you of the number of days in each month. February contains 28 days most years, but 29 days during a leap year. A leap year is any year divisible by 4, except that a year divisible by 100 is not a leap year, except that a year divisible by 400 is a leap year after all. Hence, 1800 and 1900 are not leap years, but 1600 and 2000 are. (Implement this rule in your program even if you know information to the contrary.)
Got it? Me neither. It'd be much better if it rhymed.
Comments