#43452 [Com]: strtotime returns wrong date when requested day is same as first day of the mon

From: Date: Sun, 30 Mar 2008 22:21:22 +0000
Subject: #43452 [Com]: strtotime returns wrong date when requested day is same as first day of the mon
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123791@lists.php.net to get a copy of this message
 ID:               43452
 Comment by:       billyt at claritytech dot com
 Reported By:      sean dot thorne at gmail dot com
 Status:           Open
 Bug Type:         Date/time related
 Operating System: Mac OS X 10.4.11
 PHP Version:      5.2CVS-2007-11-29 (CVS)
 New Comment:

This is still a problem with 5.2.6RC4-dev!!!

This is causing us serious issues ... any ideas???


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

[2007-11-29 15:39:52] sean dot thorne at gmail dot com

Description:
------------
When asking strtotime for the 3rd thursday in a month and the first day
of that month is thursday, it ignores the first thursday. It then begins
to count after that first Thursday and returns the fourth Thursday.

Reproduce code:
---------------
$day = strtotime("3 Thursday Nov 2007");
echo date("m-d-Y", $day);

Expected result:
----------------
11-15-2007

Actual result:
--------------
11-22-2007


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43452&edit=1



Thread (18 messages)

« previous php.bugs (#123791) next »