From:             sean dot thorne at gmail dot com
Operating system: Mac OS X 10.4.11
PHP version:      5.2CVS-2007-11-29 (CVS)
PHP Bug Type:     Date/time related
Bug description:  strtotime returns wrong date when requested day is same as 
first day of the mon

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 bug report at http://bugs.php.net/?id=43452&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43452&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43452&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43452&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43452&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43452&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43452&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43452&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43452&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43452&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43452&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43452&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43452&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43452&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43452&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43452&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43452&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43452&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43452&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43452&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43452&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43452&r=mysqlcfg

Reply via email to