note 35931 added to function.checkdate
| From: | kuka dot vaan at tuolla dot net | Date: | Fri, 19 Sep 2003 13:47:51 +0000 |
| Subject: | note 35931 added to function.checkdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56766@lists.php.net to get a copy of this message | ||
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;
}
}
----
Manual Page -- http://www.php.net/manual/en/function.checkdate.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35931
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35931&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35931&report=yes