Edit report at https://bugs.php.net/bug.php?id=63227&edit=1

 ID:                 63227
 User updated by:    helgeson dot b at gmail dot com
 Reported by:        helgeson dot b at gmail dot com
 Summary:            strtotime - weekday in a month where that weekday
                     was the first day adds 1 week
 Status:             Open
 Type:               Bug
 Package:            Date/time related
 Operating System:   CentOS 6.2
 PHP Version:        5.3.17
 Block user comment: N
 Private report:     N

 New Comment:

Description:
------------
---
>From manual page: http://www.php.net/function.strtotime#refsect1-
function.strtotime-changelog
---

requesting a given occurrence of a given weekday in a month where that weekday 
was 
the first day of the month would incorrectly add one week to the returned 
timestamp.  Although this was reported resolved as of PHP 5.2.7, it still 
exists 
in PHP 5.3.17.


Previous Comments:
------------------------------------------------------------------------
[2012-10-05 19:04:59] helgeson dot b at gmail dot com

Description:
------------
---
>From manual page: http://www.php.net/function.strtotime#refsect1-
function.strtotime-changelog
---

requesting a given occurrence of a given weekday in a month where that weekday 
was 
the first day of the month would incorrectly add one week to the returned 
timestamp.  Although this was reported resolved as of PHP 5.2.7, it still 
exists 
in PHP 5.3.3.

Maybe update the documentation to reflect the version the bug was actually 
corrected in?



Test script:
---------------
$x = strtotime('Second Monday October 2012');

print date('Y-m-d', $x);


Expected result:
----------------
2012-10-8

Actual result:
--------------
2012-10-15


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



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

Reply via email to