Bug #72719 [Opn->Dup]: Broken classes inherited from DatePeriod
| From: | requinix@php.net | Date: | Sun, 31 Jul 2016 10:18:38 +0000 |
| Subject: | Bug #72719 [Opn->Dup]: Broken classes inherited from DatePeriod | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202758@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72719&edit=1
ID: 72719
Updated by: requinix@php.net
Reported by: filip at prochazka dot su
Summary: Broken classes inherited from DatePeriod
-Status: Open
+Status: Duplicate
Type: Bug
Package: Date/time related
Operating System: Linux
PHP Version: 7.1.0beta1
Block user comment: N
Private report: N
New Comment:
Take a look at bug #72514.
Previous Comments:
------------------------------------------------------------------------
[2016-07-31 10:14:01] filip at prochazka dot su
Description:
------------
https://3v4l.org/hrZsA
It works as expected at monday to saturday. But on sunday, it always returns monday no matter what
weekday you give it, except sunday, that one works.
Test script:
---------------
var_dump(new DateTimeImmutable('Monday next week 13:00'));
var_dump(new DateTimeImmutable('Tuesday next week 14:00'));
var_dump(new DateTimeImmutable('Wednesday next week 14:00'));
var_dump(new DateTimeImmutable('Thursday next week 15:00'));
var_dump(new DateTimeImmutable('Friday next week 16:00'));
var_dump(new DateTimeImmutable('Saturday next week 17:00'));
var_dump(new DateTimeImmutable('Sunday next week 18:00'));
Expected result:
----------------
2016-08-08 13:00:00
2016-08-09 14:00:00
2016-08-10 14:00:00
2016-08-11 15:00:00
2016-08-12 16:00:00
2016-08-13 17:00:00
2016-08-14 18:00:00
Actual result:
--------------
Output for 5.6.23 - 5.6.24, 7.0.8 - 7.1.0beta1
2016-08-01 13:00:00
2016-08-01 14:00:00
2016-08-01 14:00:00
2016-08-01 15:00:00
2016-08-01 16:00:00
2016-08-01 17:00:00
2016-08-07 18:00:00
Output for 5.6.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.7
2016-08-08 13:00:00
2016-08-09 14:00:00
2016-08-10 14:00:00
2016-08-11 15:00:00
2016-08-12 16:00:00
2016-08-13 17:00:00
2016-08-14 18:00:00
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72719&edit=1