> From:             [EMAIL PROTECTED]
> Operating system: linux
> PHP version:      4.0.6
> PHP Bug Type:     Date/time related
> Bug description:  checkdate returns TRUE on false date
> The checkdate doesn't validate correcly on all dates.
> checkdate(2,29,2000); returns true even thoug the year 2000 was not a
> leapyear.

Actually, 2000 was a leap year. 

If the year is not divisible by 100 but is divisible by 4, it is a leap 
year. (1900 is therefore not a leap year.)

If the year is divisible by 100 and is divisible by 400, it is a leap year. 
(2000 is therefore a leap year.)

There is a good FAQ on this at 

There's also a good node on this stuff at http://www.everything2.com.


PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to