note 84985 deleted from function.strtotime by peehaa
| From: | peehaa@php.net | Date: | Fri, 06 Jan 2017 16:06:03 +0000 |
| Subject: | note 84985 deleted from function.strtotime by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208733@lists.php.net to get a copy of this message | ||
Note Submitter: jaymin at gmx dot net
----
strtotime() seems to treat dates delimited by slashes as m/d/y and dates delimited by dashes are
treated as d-m-y.
<?php
print date('Y-m-d', strtotime("06/08/2008"));
?>
returns 2008-06-08
while
<?php
print date('Y-m-d', strtotime("06-08-2008"));
?>
returns 2008-08-06
Using PHP 5.2.6