summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitch Hagstrand <mhagstrand@gmail.com>2017-03-01 15:08:59 -0800
committerAnatol Belski <ab@php.net>2017-03-02 22:12:34 +0100
commitb6616f7e9cac9f8f99641869c3e08bb73d10068c (patch)
treeddb97ca9910186bd0034fb6e2f90cb0b0d2393f1
parente60263d269fe222b6935afd45e8068f9da5f910c (diff)
downloadphp-git-b6616f7e9cac9f8f99641869c3e08bb73d10068c.tar.gz
Fix bug73858.phpt to work in months without 31 days
Used hardcoded months in bug73858.phpt rather than the current and previous month. (cherry picked from commit 29333550d2237d472193ae2bf4aec53a7bc5648a)
-rw-r--r--ext/date/tests/bug73858.phpt6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/date/tests/bug73858.phpt b/ext/date/tests/bug73858.phpt
index 72474d3edb..5b619b1d47 100644
--- a/ext/date/tests/bug73858.phpt
+++ b/ext/date/tests/bug73858.phpt
@@ -7,8 +7,8 @@ In the "verbose setup method" I'm trying setup the DateTime object myself
to see if it's the format string which is parsed in correctly or if it's the DateTime
object which is breaking stuff. From the testing it appears DateTime is broken somehow.
*/
-$ss = 'first day of last month midnight';
-$es = 'first day of this month midnight - 1 second';
+$ss = 'first day of March midnight';
+$es = 'first day of April midnight - 1 second';
$s = new DateTime($ss);
$e = new DateTime($es);
@@ -50,7 +50,7 @@ effect on the results of the diff. By modifying the datetime with ->modify every
it just means you have to be careful of how we work with DateTimes .
*/
$s = new DateTime($ss);
-$e = new DateTime('first day of this month midnight');
+$e = new DateTime('first day of April midnight');
$e->modify('- 1 second');
var_dump($e->diff($s)->days); // 30 ... and should be 30
?>