From: for-bugs at hnw dot jp Operating system: any PHP version: 5.2.8 PHP Bug Type: Date/time related Bug description: strtotime() has inconsistency between 'next Monday' and '+1 Monday'
Description: ------------ With PHP 5.2.8 or 5.3.0alpha3, 'next Monday' and '+1 Monday' is diffrenet. On Monday, 'next Monday' seems the same day. However, '+1 Monday' means 1 week later. 'next day' and '+1 day' performs the same behavior, so it is natural to me that 'next Monday' and '+1 Monday' is the same meanings. In addition, my GNU date command never accept '+1 Monday' and 'next Monday' on Monday means the same day. So, I cannot tell what is the right behavior. I only report inconsistency. Reproduce code: --------------- <?php var_dump(date("Y-m-d",strtotime("+1 Monday 2008-12-01"))); var_dump(date("Y-m-d",strtotime("next Monday 2008-12-01"))); Actual result: -------------- string(10) "2008-12-01" string(10) "2008-12-08" -- Edit bug report at http://bugs.php.net/?id=46932&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46932&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46932&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46932&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46932&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46932&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46932&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46932&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46932&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46932&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46932&r=support Expected behavior: http://bugs.php.net/fix.php?id=46932&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46932&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46932&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46932&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46932&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46932&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46932&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46932&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46932&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46932&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46932&r=mysqlcfg