#40100 [Opn->Asn]: strtotime() first occurance of weekday returns wrong date
| From: | tony2001@php.net | Date: | Thu, 11 Jan 2007 15:58:44 +0000 |
| Subject: | #40100 [Opn->Asn]: strtotime() first occurance of weekday returns wrong date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107494@lists.php.net to get a copy of this message | ||
ID: 40100
Updated by: tony2001@php.net
Reported By: support at dailytechnology dot net
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: All
PHP Version: 5.2.0
-Assigned To:
+Assigned To: вукшсл
Previous Comments:
------------------------------------------------------------------------
[2007-01-11 15:14:11] support at dailytechnology dot net
Description:
------------
See also: http://bugs.php.net/bug.php?id=40003
Using 'Second Monday Jan 2007' or 'Second Tuesday Feb 2007' will return
results ahead one week (occurs only when first occurrence of this
weekday coincides with first of month).
Reproduce code:
---------------
echo date('Y-m-d', strtotime('second monday jan 2007'));
echo date('Y-m-d', strtotime('second monday feb 2007'));
echo date('Y-m-d', strtotime('second thursday feb 2007'));
echo date('Y-m-d', strtotime('second thursday jan 2007'));
Expected result:
----------------
2007-01-08
2007-02-08
2007-02-15
2007-01-11
Actual result:
--------------
2007-01-15
2007-02-12
2007-02-15
2007-01-11
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40100&edit=1