note 35931 deleted from function.checkdate by vincent
| From: | vincent@php.net | Date: | Fri, 19 Sep 2003 13:53:44 +0000 |
| Subject: | note 35931 deleted from function.checkdate by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56768@lists.php.net to get a copy of this message | ||
Note Submitter: kuka.vaan@tuolla.net
----
is_int("01") returns false but is a valid input for the first day of month or as January.
Perhaps something else than is_int. Something like this?
foreach(array($day,$month,$year) as $num)
{
if(!preg_match("([0-9]+[0-9])",$num, $match))
{
return false;
}
if($match[0] != $num)
{
return false;
}
}