cvs: php4 /ext/standard parsedate.y
| From: | Marko Karppinen | Date: | Thu, 24 Jan 2002 22:25:00 +0000 |
| Subject: | cvs: php4 /ext/standard parsedate.y | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9168@lists.php.net to get a copy of this message | ||
markonen Thu Jan 24 17:25:00 2002 EDT
Modified files:
/php4/ext/standard parsedate.y
Log:
Ignore ordinal suffixes on numbers (bug #15210)
Index: php4/ext/standard/parsedate.y
diff -u php4/ext/standard/parsedate.y:1.29 php4/ext/standard/parsedate.y:1.30
--- php4/ext/standard/parsedate.y:1.29 Sun Dec 2 06:35:28 2001
+++ php4/ext/standard/parsedate.y Thu Jan 24 17:24:58 2002
@@ -862,6 +862,16 @@
yyInput--;
if (sign < 0)
yylval.Number = -yylval.Number;
+ /* Ignore ordinal suffixes on numbers */
+ c = *yyInput;
+ if (c == 's' || c == 'n' || c == 'r' || c == 't') {
+ c = *++yyInput;
+ if (c == 't' || c == 'd' || c == 'h') {
+ yyInput++;
+ } else {
+ yyInput--;
+ }
+ }
return sign ? tSNUMBER : tUNUMBER;
}
if (ISALPHA (c))