ID:               26154
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tnelson at wticorp dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Date/time related
 Operating System: RedHat Linux 9.0
 PHP Version:      4.3.3
 New Comment:

You really can't throw strtotime just anything and expect it to work.
Notice the words 'try' and 'about any' in the manual for this
function..



Previous Comments:
------------------------------------------------------------------------

[2003-11-06 12:52:02] tnelson at wticorp dot com

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 this bug report at http://bugs.php.net/?id=26154&edit=1

Reply via email to