note 11827 deleted from function.mktime by hholzgra

From: Date: Sun, 14 Apr 2002 22:13:06 +0000
Subject: note 11827 deleted from function.mktime by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-29332@lists.php.net to get a copy of this message
He up above said: "Feb 2000 was a leap year. I don't remember the algorythm, but just run cal on any unix system for year 2000, and you'll see." The algorith is 'if the year is divisible by 400 then it's not a leap year'. Year 2000 is divisible by 400 and is not a leap year. Year 2100 is divisible by 4 so we would expect it to be a leap year, and since it is not divisible by 400 it WILL be a leap year. [Editors note: Look it up in an encyclopedia if you're unsure, it's a little bit different: if (year divisible_by 400) leap_year elseif (year divisible_by 100) no_leap_year elseif (year divisible_by 4) leap_year else no_leap_year So 2000 _was_ a leap year. This did not break the habit of each 4th year, 1900 and 2100 are the nearest years which are no leap-years, even though they come 4 years after a leapyear. --jeroen]

« previous php.notes (#29332) next »