Bug #77232 [Opn->Csd]: Wrong week of month for 2018-12-31

From: Date: Mon, 03 Dec 2018 11:48:16 +0000
Subject: Bug #77232 [Opn->Csd]: Wrong week of month for 2018-12-31
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218253@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77232&edit=1 ID: 77232 User updated by: uli dot staerk at dc1 dot com Reported by: uli dot staerk at dc1 dot com Summary: Wrong week of month for 2018-12-31 -Status: Open +Status: Closed Type: Bug Package: Date/time related Operating System: Linux PHP Version: 7.0.32 Block user comment: N Private report: N New Comment: Meh! Think -> Report Previous Comments: ------------------------------------------------------------------------ [2018-12-03 11:44:43] uli dot staerk at dc1 dot com Description: ------------ The output for date("Y/W") is not correct for 2018-12-31! Test script: --------------- php > echo date("Y/W", strtotime('2018-12-30')); 2018/52 php > echo date("Y/W", strtotime('2018-12-31')); 2018/01 php > echo date("Y/W", strtotime('2019-01-01')); 2019/01 Expected result: ---------------- php > echo date("Y/W", strtotime('2018-12-31')); 2019/01 Actual result: -------------- php > echo date("Y/W", strtotime('2018-12-31')); 2018/01 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77232&edit=1

« previous php.bugs (#218253) next »