|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-07-31 08:25 UTC] peehaa@php.net
-Status: Open
+Status: Not a bug
[2018-07-31 08:25 UTC] peehaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 16:00:01 2025 UTC |
Description: ------------ The PHP version is actually 7.0.30 (not in the list) The test script produces the following result: 2018-07-31 2018-07-01 2018-06-01 Test script: --------------- <?php $now = new DateTime('2018-07-31'); echo $now->format('Y-m-d') . "\n"; echo $now->sub(new DateInterval('P1M'))->format('Y-m-d') . "\n"; echo $now->sub(new DateInterval('P1M'))->format('Y-m-d') . "\n";