Bug #71725 [NEW]: Incorrect ordinal suffix used for 29th February

From: Date: Sun, 06 Mar 2016 22:27:20 +0000
Subject: Bug #71725 [NEW]: Incorrect ordinal suffix used for 29th February
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199633@lists.php.net to get a copy of this message
From: daniel at honestempire dot com Operating system: Mac OS X PHP version: 7.0.4 Package: Calendar related Bug Type: Bug Bug description:Incorrect ordinal suffix used for 29th February Description: ------------ When attempting to find the last weekday of February 2016, I stumbled across this bug. See the test script for replication information. Test script: --------------- $lastDayOfMonth = date('tS F Y', strtotime('2016-02-01 12:00:00')); var_dump($lastDayOfMonth); // string(18) "29st February 2016" var_dump(date('d', strtotime(sprintf('last weekday %s', $lastDayOfMonth)))); // string(2) "26" (should be string(2) "29") -- Edit bug report at https://bugs.php.net/bug.php?id=71725&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71725&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71725&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71725&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71725&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71725&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71725&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71725&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71725&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71725&r=support Expected behavior: https://bugs.php.net/fix.php?id=71725&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71725&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71725&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71725&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71725&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71725&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71725&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71725&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71725&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71725&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71725&r=mysqlcfg

« previous php.bugs (#199633) next »