Bug #67109 [Asn->Csd]: First uppercase letter breaks date string parsing

From: Date: Mon, 18 Aug 2014 19:28:14 +0000
Subject: Bug #67109 [Asn->Csd]: First uppercase letter breaks date string parsing
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187169@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67109&edit=1 ID: 67109 Updated by: derick@php.net Reported by: velosipedist dot org at gmail dot com Summary: First uppercase letter breaks date string parsing -Status: Assigned +Status: Closed Type: Bug Package: Date/time related Operating System: any PHP Version: 5.5.11 Assigned To: derick Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2014-04-22 08:33:35] 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"); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=67109&edit=1

« previous php.bugs (#187169) next »