mirror of
https://github.com/php/php-src.git
synced 2024-09-24 11:27:28 +00:00
MFB51: Fixed bug #35456 (+ 1 [time unit] format did not work).
This commit is contained in:
parent
a03df6fef7
commit
2303ff493c
File diff suppressed because it is too large
Load Diff
@ -801,7 +801,7 @@ dateshortwithtimelongtz = datenoyear iso8601normtz;
|
||||
reltextnumber = 'first'|'next'|'second'|'third'|'fourth'|'fifth'|'sixth'|'seventh'|'eight'|'ninth'|'tenth'|'eleventh'|'twelfth'|'last'|'previous'|'this';
|
||||
reltextunit = (('sec'|'second'|'min'|'minute'|'hour'|'day'|'week'|'fortnight'|'forthnight'|'month'|'year') 's'?) | dayfull;
|
||||
|
||||
relnumber = ([+-]?[0-9]+);
|
||||
relnumber = ([+-]?[ ]*[0-9]+);
|
||||
relative = (relnumber space? reltextunit)+;
|
||||
relativetext = (reltextnumber space? reltextunit)+;
|
||||
|
||||
|
16
ext/date/tests/bug35456.phpt
Normal file
16
ext/date/tests/bug35456.phpt
Normal file
@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #35456 (+ 1 [time unit] format did not work)
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set("UTC");
|
||||
|
||||
$t = 1133216119;
|
||||
|
||||
echo date(DATE_ISO8601, strtotime("+ 1 day", $t)) . "\n";
|
||||
echo date(DATE_ISO8601, strtotime("+ 1 month", $t)) . "\n";
|
||||
echo date(DATE_ISO8601, strtotime("+ 1 week", $t)) . "\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
2005-11-29T22:15:19+0000
|
||||
2005-12-28T22:15:19+0000
|
||||
2005-12-05T22:15:19+0000
|
Loading…
Reference in New Issue
Block a user