You are not a Hardcore LiveJournal user unless this is the second time you've been able to post on February 29th :-)Do people with birthdays on Feb. 29 celebrate them on Feb. 28 or Mar. 1 on normal years?
First time:
http://www.livejournal.com/users/brad/2000/02/29/
Second time:
Now. :P
Do you know how to calculate whether it's a leap year or not? It's not just ever 4 years... It's ever 4 years, except every 100 years, except every 400 years. (which is why 2000 was a leap year). Here's the LJ code for it:
sub days_in_month { my ($month, $year) = @_; if ($month == 2) { return 29 unless $year; # assume largest if ($year % 4 == 0) { # years divisible by 400 are leap years return 29 if $year % 400 == 0; # if they're divisible by 100, they aren't. return 28 if $year % 100 == 0; # otherwise, if divisible by 4, they are. return 29; } } return ((31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)[$month-1]); }
← Ctrl ← Alt
Ctrl → Alt →
← Ctrl ← Alt
Ctrl → Alt →