|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-07-21 21:21 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 08:00:02 2025 UTC |
Description: ------------ An extremely common date format in the USA is middle endian, which is often expressed in one of two ways. Today's date (July 21, 2009) could be expressed as either of the following: 1. 07/21/2009 2. 07-21-2009 Currently, if the first version (1) is passed into strtotime(), it successfully parses the date. However, the second version (2) returns FALSE. Reproduce code: --------------- <?php var_dump(strtotime('07/21/2009')); // good var_dump(strtotime('07-21-2009')); // bad ?> Expected result: ---------------- int(1248152400) int(1248152400) Actual result: -------------- int(1248152400) bool(false)