note 58971 rejected from function.strtotime by dmytton
| From: | dmytton@php.net | Date: | Tue, 22 Nov 2005 19:13:24 +0000 |
| Subject: | note 58971 rejected from function.strtotime by dmytton | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-98939@lists.php.net to get a copy of this message | ||
Note Submitter: kevintm at ameritech dot net
----
Am I correct in assuming that strtotime doesn't check or know that a date is a valid, calendar
date? If I pass a date of 2/30/05 (for example) into strtotime, it hands me back an integer even
though that date can't possibly exist (since 2/29 is that last date a February can ever have
and then only on leap years). If I'm asking for a string date input on a website to pass into
strtotime to verify it's a valid date, do I have to do calendar validation beforehand then?
Thanks.
Kevin