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

From: Date: Mon, 03 Dec 2018 14:02:33 +0000
Subject: Bug #77232 [Csd->Nab]: Wrong week of month for 2018-12-31
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218255@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 Updated by: cmb@php.net Reported by: uli dot staerk at dc1 dot com Summary: Wrong week of month for 2018-12-31 -Status: Closed +Status: Not a bug Type: Bug Package: Date/time related Operating System: Linux PHP Version: 7.0.32 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2018-12-03 11:48:16] uli dot staerk at dc1 dot com Meh! Think -> Report ------------------------------------------------------------------------ [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 (#218255) next »