#49115 [Com]: date('M', strtotime('February')) prints "March"

From: Date: Thu, 30 Jul 2009 23:25:54 +0000
Subject: #49115 [Com]: date('M', strtotime('February')) prints "March"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-140506@lists.php.net to get a copy of this message
ID: 49115 Comment by: php at davidstockton dot com Reported By: php at davidstockton dot com Status: Open Bug Type: Date/time related Operating System: Windows XP/Linux PHP Version: 5.2.10 New Comment: Also, not sure if this is related, but the following code has similar strange behavior: for ($i = 1; $i <= 12; $i++) { echo date('F', gmmktime(0,0,0,$i)), "<br/>"; } Output: -------- January March March April May June July August September October November December Expected: ---------- January February March April May June July August September October November December I'd be happy to open a new defect if it's not related, or to be told why these are correct behavior. Thanks. Previous Comments: ------------------------------------------------------------------------ [2009-07-30 23:16:45] php at davidstockton dot com Description: ------------ If I use strtotime on 'February' the resulting timestamp is in March. Reproduce code: --------------- echo date('F', strtotime('February')); Expected result: ---------------- February Actual result: -------------- March ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49115&edit=1

« previous php.bugs (#140506) next »