cvs: php4 /ext/standard parsedate.y /ext/standard/tests/time 002.phpt
| From: | Derick Rethans | Date: | Sun, 06 May 2001 18:33:49 +0000 |
| Subject: | cvs: php4 /ext/standard parsedate.y /ext/standard/tests/time 002.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5568@lists.php.net to get a copy of this message | ||
derick Sun May 6 11:33:49 2001 EDT
Added files:
/php4/ext/standard/tests/time 002.phpt
Modified files:
/php4/ext/standard parsedate.y
Log:
- Partial fix for bug #9050, support for "Jan 19 2000" date format
Index: php4/ext/standard/parsedate.y
diff -u php4/ext/standard/parsedate.y:1.25 php4/ext/standard/parsedate.y:1.26
--- php4/ext/standard/parsedate.y:1.25 Thu Dec 7 16:12:35 2000
+++ php4/ext/standard/parsedate.y Sun May 6 11:33:49 2001
@@ -320,6 +320,11 @@
yyMonth = $2;
yyYear = -$3;
}
+ | tMONTH tUNUMBER tUNUMBER {
+ yyMonth = $1;
+ yyDay = $2;
+ yyYear = $3;
+ }
| tMONTH tUNUMBER {
yyMonth = $1;
yyDay = $2;
Index: php4/ext/standard/tests/time/002.phpt
+++ php4/ext/standard/tests/time/002.phpt
--TEST--
strtotime() function
--POST--
--GET--
--FILE--
<?php
echo "1999-10-13\n";
echo strtotime ("1999-10-13")."\n";
echo strtotime ("Oct 13 1999")."\n\n";
echo "2000-01-19\n";
echo strtotime ("2000-01-19")."\n";
echo strtotime ("Jan 19 2000")."\n\n";
echo "2001-12-21\n";
echo strtotime ("2001-12-21")."\n";
echo strtotime ("Dec 21 2001")."\n\n";
echo "2001-12-21 12:16\n";
echo strtotime ("2001-12-21 12:16")."\n";
echo strtotime ("Dec 21 2001 12:16")."\n";
echo strtotime ("Dec 21 12:16")."\n";
?>
--EXPECT--
1999-10-13
939765600
939765600
2000-01-19
948236400
948236400
2001-12-21
1008889200
1008889200
2001-12-21 12:16
1008933360
1008933360
-1