Bug 309925, fix regression in parsing dates containing HH:MM caused by bug 301738, r=mrbkap, sr=brendan

This commit is contained in:
bob%bclary.com 2005-09-27 04:10:38 +00:00
parent 078c459ef3
commit 6c6bfef31d

View File

@ -689,7 +689,7 @@ date_parseString(JSString *str, jsdouble *result)
mday = /*byte*/ n;
else
goto syntax;
} else if (i < limit && c != ',' && c > ' ' && c != '-') {
} else if (i < limit && c != ',' && c > ' ' && c != '-' && c != '(') {
goto syntax;
} else if (seenplusminus && n < 60) { /* handle GMT-3:30 */
if (tzoffset < 0)
@ -698,7 +698,7 @@ date_parseString(JSString *str, jsdouble *result)
tzoffset += n;
} else if (hour >= 0 && min < 0) {
min = /*byte*/ n;
} else if (min >= 0 && sec < 0) {
} else if (prevc == ':' && min >= 0 && sec < 0) {
sec = /*byte*/ n;
} else if (mon < 0) {
mon = /*byte*/n;