From: tnelson at wticorp dot com Operating system: RedHat Linux 9.0 PHP version: 4.3.3 PHP Bug Type: Date/time related Bug description: day of week modifier on real date produced unexpected result
Description: ------------ The day of week modifier when used with a "real" date does not advance to that day of the week. I expected that the "explicit mention of a day of the week will forward the date (only if necessary) to reach that day of the week in the future." The source of this expectation (aside from the fact that "next friday" worked when I tried it) is the "Day of Week Item" section in the GNU manual page referenced from the strtotime function documentation. http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html "next week friday" works as expected "+3 weeks friday" works as expected "dec 25 friday" does not work as expected. Instead it returns Thursday December 25, 2003 "dec 25 +1 week friday" also does not work as expected. Instead it returns Thursday January 1, 2004 Reproduce code: --------------- echo date("l F j, Y ", strtotime("dec 25 friday"); Expected result: ---------------- Expected Friday December 26, 2003 Actual result: -------------- produces... Thursday December 25, 2003 -- Edit bug report at http://bugs.php.net/?id=26154&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26154&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26154&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26154&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26154&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26154&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26154&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26154&r=support Expected behavior: http://bugs.php.net/fix.php?id=26154&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26154&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26154&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26154&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26154&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26154&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26154&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26154&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26154&r=float