Edit report at https://bugs.php.net/bug.php?id=63257&edit=1
ID: 63257 Updated by: m...@php.net Reported by: php at skay dot se Summary: checkdate(): Wrong if year is two digits and year is 2000 -Status: Open +Status: Not a bug Type: Bug Package: *Calendar problems Operating System: Unix PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2012-10-11 11:25:58] ewgraf at gmail dot com Seems not a bug. >From manual: > 'year' The year is between 1 and 32767 inclusive. int from "00" will be 0 ------------------------------------------------------------------------ [2012-10-10 22:22:19] php at skay dot se Description: ------------ --- >From manual page: http://www.php.net/function.checkdate --- If year is 2000 the function will return TRUE (provided the rest is valid) - Thats good! But if year is 00 the function will always return FALSE Test script: --------------- echo checkdate("01", "01", "2000"); echo checkdate("01", "01", "00"); Expected result: ---------------- TRUE TRUE Actual result: -------------- TRUE FALSE ------------------------------------------------------------------------ [2012-10-10 22:17:13] php at skay dot se Description: ------------ --- >From manual page: http://www.php.net/function.checkdate --- PHP version 5.3.10 If year is 2000 the function will return TRUE (provided the rest is valid) - Thats good! But if year is 00 the function will always return FALSE Test script: --------------- echo checkdate("01", "01", "2000"); echo checkdate("01", "01", "00"); Expected result: ---------------- TRUE TRUE Actual result: -------------- TRUE FALSE ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63257&edit=1