note 76798 added to function.checkdate
| From: | ahlers_wim at hotmail dot com | Date: | Tue, 31 Jul 2007 09:34:43 +0000 |
| Subject: | note 76798 added to function.checkdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129069@lists.php.net to get a copy of this message | ||
function checkdate_FIX ($month, $day, $year)
{
// Oops!!! The PHP function is missing the 400 years cycle correction. Solved by this correction
function!
if ($month == 2 and $day == 29 and $year % 400 == 0)
{
return false;
}
else
{
return checkdate($month, $day, $year);
}
}
----
Server IP: 83.137.20.120
Probable Submitter: 86.80.219.48
----
Manual Page -- http://www.php.net/manual/en/function.checkdate.php
Edit -- https://master.php.net/note/edit/76798
Del: integrated -- https://master.php.net/note/delete/76798/integrated
Del: useless -- https://master.php.net/note/delete/76798/useless
Del: bad code -- https://master.php.net/note/delete/76798/bad+code
Del: spam -- https://master.php.net/note/delete/76798/spam
Del: non-english -- https://master.php.net/note/delete/76798/non-english
Del: in docs -- https://master.php.net/note/delete/76798/in+docs
Del: other reasons-- https://master.php.net/note/delete/76798
Reject -- https://master.php.net/note/reject/76798
Search -- https://master.php.net/manage/user-notes.php