Bug #68603 [Opn->Dup]: "Monday this week" works (wrongly) on Sunday starting weeks.

From: Date: Sun, 07 Aug 2016 09:39:07 +0000
Subject: Bug #68603 [Opn->Dup]: "Monday this week" works (wrongly) on Sunday starting weeks.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-203027@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68603&edit=1 ID: 68603 Updated by: cmb@php.net Reported by: derick@php.net Summary: "Monday this week" works (wrongly) on Sunday starting weeks. -Status: Open +Status: Duplicate Type: Bug Package: Date/time related Operating System: * PHP Version: 5.6.3 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This is actually a duplicate of bug #63740, which has been fixed as of PHP 5.6.23 and 7.0.8, respectively (see <https://3v4l.org/7P9Dr>). Previous Comments: ------------------------------------------------------------------------ [2014-12-14 11:29:42] derick@php.net Description: ------------ The note at http://php.net/manual/en/function.strtotime.php#105344 describes: We can now do thing like this with strtotime: <?php $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: --------------- <?php $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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68603&edit=1

« previous php.bugs (#203027) next »