Bug #73628 [Fbk->NoF]: DateTime not able to handle DateInterval on february
| From: | php-bugs at lists dot php dot net | Date: | Sun, 11 Dec 2016 04:22:23 +0000 |
| Subject: | Bug #73628 [Fbk->NoF]: DateTime not able to handle DateInterval on february | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205910@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73628&edit=1
ID: 73628
Updated by: php-bugs@lists.php.net
Reported by: etienne dot chabert at gmail dot com
Summary: DateTime not able to handle DateInterval on february
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: Date/time related
Operating System: OSX
PHP Version: 7.0.13
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2016-11-30 16:46:14] cmb@php.net
Please state what you expect both expressions to yield!
------------------------------------------------------------------------
[2016-11-30 14:21:50] etienne dot chabert at gmail dot com
Description:
------------
You should execute : (new DateTime("2016-11-30"))->add(new
DateInterval("P3M"))
Result -> 2017-03-02
Then execute : (new DateTime("2016-12-01"))->add(new DateInterval("P3M"))
Result -> 2017-03-01
Test script:
---------------
if ((new DateTime("2016-11-30"))->add(new DateInterval("P3M")) > (new
DateTime("2016-12-01"))->add(new DateInterval("P3M")))
throw new Exception("WTF");
echo "You fixed it";
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73628&edit=1