Bug #63927 [NEW]: Bogus week number with date + strtotime

From: Date: Mon, 07 Jan 2013 09:06:49 +0000
Subject: Bug #63927 [NEW]: Bogus week number with date + strtotime
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-175808@lists.php.net to get a copy of this message
From: tcheko at no-log dot org Operating system: Linux PHP version: 5.4.10 Package: Date/time related Bug Type: Bug Bug description:Bogus week number with date + strtotime Description: ------------ the test script returns date formated as year+week. It should return a list of date like this: ... 201250 201251 201252 201301 201302 ... NB: increase $i if current weeknumber is greater than 14 to expose the bug. Test script: --------------- <?php for($i = 15; $i >= 0; $i--) echo date("YW", strtotime("-$i week")) . "<br />"; ?> Expected result: ---------------- ... 201250 201251 201252 201301 201302 ... Actual result: -------------- ... 201250 201251 201252 **201201** 201302 ... -- Edit bug report at https://bugs.php.net/bug.php?id=63927&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63927&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63927&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63927&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63927&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63927&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63927&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63927&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63927&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63927&r=support Expected behavior: https://bugs.php.net/fix.php?id=63927&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63927&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63927&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63927&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63927&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63927&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63927&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63927&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63927&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63927&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63927&r=mysqlcfg

« previous php.bugs (#175808) next »