Bug #66453 [Opn->Nab]: Datetime modify bad result

From: Date: Thu, 09 Jan 2014 22:42:35 +0000
Subject: Bug #66453 [Opn->Nab]: Datetime modify bad result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-183679@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66453&edit=1 ID: 66453 Updated by: requinix@php.net Reported by: mail at piotrantosik dot com Summary: Datetime modify bad result -Status: Open +Status: Not a bug Type: Bug Package: *Calendar problems Operating System: Linux PHP Version: 5.5.7 Block user comment: N Private report: N New Comment: Are you saying that December 31st is not a day? Because it totally is. The arithmetic is correct. Previous Comments: ------------------------------------------------------------------------ [2014-01-09 22:35:25] mail at piotrantosik dot com Description: ------------ DateTime object return non exist day in calendar. Test script: --------------- $d = new \DateTime('2014-01-08'); $d->modify('-8 day'); Expected result: ---------------- echo $d->format('Y-m-d')) //2013-12-30 Actual result: -------------- echo $d->format('Y-m-d')) //2013-12-31 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66453&edit=1

« previous php.bugs (#183679) next »