note 95066 deleted from function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Fri, 11 Dec 2009 16:20:15 +0000 |
| Subject: | note 95066 deleted from function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163861@lists.php.net to get a copy of this message | ||
Note Submitter: Chris_lu
----
Be careful with date separators, they do change the date meaning :
<?php
// this will parse date as dd-mm-yyyy:
echo(date('Y-m-d',strtotime('01-12-2009'))); // output: 2009-12-01
// this will parse date as mm/dd/yyyy:
echo(date('Y-m-d',strtotime('01/12/2009'))); // output: 2009-01-12
?>