|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-08-17 19:58 UTC] bugs at oliverboorman dot biz
[2014-08-18 03:41 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2014-08-18 03:41 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 21:00:01 2025 UTC |
Description: ------------ When passing date strings such as "second Saturday August 2015" to strtotime(), the wrong output is returned. The "first", "second" or "third" qualifiers seem to use the wrong index in certain cases. For example, in 2015, the first day of August will be a Saturday so this should be considered the first Saturday of August. However, the function seems to treat it as the zeroth Saturday. Test script: --------------- $test = strtotime("second Saturday August 2015"); echo date("d M Y h:i" $test); Expected result: ---------------- 08 Aug 2015 12:00 Actual result: -------------- 15 Aug 2015 12:00