#38330 [NEW]: Checkdate reports false on good dates
| From: | thomasvk at gmail dot com | Date: | Fri, 04 Aug 2006 14:07:57 +0000 |
| Subject: | #38330 [NEW]: Checkdate reports false on good dates | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-100339@lists.php.net to get a copy of this message | ||
From: thomasvk at gmail dot com
Operating system: Windows XP SP2
PHP version: 5.1.4
PHP Bug Type: Unknown/Other Function
Bug description: Checkdate reports false on good dates
Description:
------------
checkdate() returns false on two correct dates, which are 29 February 4905
and 30 February 8228, according to the following source (warning: Dutch!):
http://home.wanadoo.nl/~haj.quast/pages/schrikkeljaar.htm
I shall translate/quote the paragraph concerning these dates:
Correction in the future
According to calculations the next correction is due in the year 4905. In
this year there will be an extera leapday so it will be 29 February two
years in row. A next correction shall be due in the year 8228. That year
is already a leapyear in itself so there will be a 30 February.
I hope there's a dev who understands Dutch to confirm this.
Reproduce code:
---------------
$x = checkdate(2, 29, 4905)
$y = checkdate(2, 30, 8228)
Expected result:
----------------
$x = checkdate(2, 29, 4905) // $x should be true
$y = checkdate(2, 30, 8228) // $y should be true
Actual result:
--------------
$x and $y should both become true.
--
Edit bug report at http://bugs.php.net/?id=38330&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38330&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38330&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38330&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38330&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38330&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38330&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38330&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38330&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38330&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38330&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38330&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38330&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38330&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38330&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38330&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38330&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38330&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38330&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38330&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38330&r=mysqlcfg