|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68603 "Monday this week" works (wrongly) on Sunday starting weeks.
Submitted: 2014-12-14 11:29 UTC Modified: 2016-08-07 09:39 UTC
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:1 (25.0%)
From: Assigned: cmb (profile)
Status: Duplicate Package: Date/time related
PHP Version: 5.6.3 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2014-12-14 11:29 UTC]
The note at describes:

We can now do thing like this with strtotime:
$weekMondayTime = strtotime('Monday this week');
However this works based on a week starting Sunday.  I do not know if we can tweak this PHP behavior, anyone know?

But it really should use Monday starting weeks.

Test script:
$weekMondayTime = strtotime('Monday this week');
echo date('Y-m-d h:i:s', $weekMondayTime), "\n";

Expected result:
2014-12-08 12:00:00

Actual result:
2014-12-15 12:00:00


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-07 09:39 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2016-08-07 09:39 UTC]
This is actually a duplicate of bug #63740, which has been fixed
as of PHP 5.6.23 and 7.0.8, respectively (see
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 20:03:33 2021 UTC