note 76798 rejected from function.checkdate by scottmac

From: Date: Tue, 31 Jul 2007 11:53:49 +0000
Subject: note 76798 rejected from function.checkdate by scottmac
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-129073@lists.php.net to get a copy of this message
Note Submitter: ahlers_wim at hotmail dot com ---- 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); } }

« previous php.notes (#129073) next »