php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67109 First uppercase letter breaks date string parsing
Submitted: 2014-04-22 08:33 UTC Modified: 2014-04-22 13:50 UTC
From: velosipedist dot org at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.5.11 OS: any
Private report: No CVE-ID: None
 [2014-04-22 08:33 UTC] velosipedist dot org at gmail dot com
Description:
------------
If i make first letter uppercase in date string "last day of this month", strtotime returns FIRST day.
But same mixed-case string can be parsed correctly in unpredictable order:\

http://codepad.viper-7.com/MclUwk
http://codepad.viper-7.com/ofbYag

Test script:
---------------
<?php
assert(date('d',strtotime('last day of april')) == "30");
assert(date('d',strtotime('last Day of april')) == "30");
// will raise warning
assert(date('d',strtotime('Last Day of april')) == "30");
	


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-22 13:50 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2014-08-18 19:28 UTC] derick@php.net
Automatic comment on behalf of github@derickrethans.nl
Revision: http://git.php.net/?p=php-src.git;a=commit;h=36d05d75c8d4db6d540dd7ac7cf80a4031f6ca40
Log: Fixed bug #67109: First uppercase letter breaks date string parsing.
 [2014-08-18 19:28 UTC] derick@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC