MFB51: Fixed bug #35456 (+ 1 [time unit] format did not work).

This commit is contained in:
Ilia Alshanetsky 2005-11-28 23:26:40 +00:00
parent a03df6fef7
commit 2303ff493c
3 changed files with 24883 additions and 16839 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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)+;

View 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