php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14473 strtotime wont parse date
Submitted: 2001-12-12 18:36 UTC Modified: 2003-08-17 16:44 UTC
From: lindsay dot marshall at ncl dot ac dot uk Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.1.0 OS: Redhat 7.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lindsay dot marshall at ncl dot ac dot uk
New email:
PHP Version: OS:

 

 [2001-12-12 18:36 UTC] lindsay dot marshall at ncl dot ac dot uk
strtotime('12th December 2001')

returns -1

The 'th' after the number causes the problem, but this is a perfectly acceptable date representation and should be recognised I believe.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-12 18:46 UTC] derick@php.net
From the manual:

strtotime --  Parse about any English textual datetime description into a UNIX timestamp

please note it says any, not all.

Moving this to a feature request.

Derick
 [2003-08-17 16:44 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 09:01:34 2025 UTC