Bug #63863 [ReO->Csd]: DateTime:setDate() day not used after modify("first/last day of...")

From: Date: Wed, 29 Mar 2017 19:27:10 +0000
Subject: Bug #63863 [ReO->Csd]: DateTime:setDate() day not used after modify("first/last day of...")
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208164@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63863&edit=1

 ID:                 63863
 Updated by:         requinix@php.net
 Reported by:        brian dot feaver at sellingsource dot com
 Summary:            DateTime:setDate() day not used after
                     modify("first/last day of...")
-Status:             Re-Opened
+Status:             Closed
 Type:               Bug
 Package:            Date/time related
 Operating System:   Mac OS X
 PHP Version:        7.1.2
-Assigned To:        
+Assigned To:        derick
 Block user comment: N
 Private report:     N

 New Comment:

Yup, looks fixed with the changes made for bug #73858.


Previous Comments:
------------------------------------------------------------------------
[2017-03-29 19:09:11] php-bugs at allenjb dot me dot uk

I was reviewing this bug and I believe all the reported cases are fixed as of 7.1.3 and 7.0.17

------------------------------------------------------------------------
[2017-03-15 10:00:06] requinix@php.net

Related To: Bug #74249

------------------------------------------------------------------------
[2017-03-15 06:57:09] requinix@php.net

Still present in the case of *not* using modify: https://3v4l.org/EoLFW

------------------------------------------------------------------------
[2017-03-15 06:19:48] grandfelix at gmail dot com

This is still not fixed as it was said. Example below still does not work as expected.

$firstDayInMonth = new DateTime('first day of january');

echo $firstDayInMonth->setDate(date('Y'), 1,
date('d'))->format('Y-m-d');

Outputs:
2017-01-01

PHP: 7.0.6-3

------------------------------------------------------------------------
[2016-06-29 17:34:26] cmb@php.net

This issue has been fixed as of PHP 5.6.19 and 7.0.4, see
<https://3v4l.org/ATGLp> and <https://3v4l.org/H3jZY>.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=63863


--
Edit this bug report at https://bugs.php.net/bug.php?id=63863&edit=1


Thread (15 messages)

« previous php.bugs (#208164) next »