|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-01-08 21:54 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
-Package: *Calendar problems
+Package: Date/time related
[2018-01-08 21:54 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ strtotime() outputs the xth + 1 weekday instead of the xth weekday when the defined month starts on the defined weekday. Example: The expected output of strtotime('January 2018 third Monday') is the timestamp for '2018-01-15', which is the third Monday of January 2018. Instead, strtotime() outputs the timestamp for '2018-01-22', which is the fourth Monday of January 2018 because that month starts on a Monday. Test script: --------------- print 'Expected: 2018-01-15. Result: ' . date('Y-m-d', strtotime('january 2018 third monday'));