diff options
Diffstat (limited to 'src/3rdparty/v8/src/dateparser-inl.h')
-rw-r--r-- | src/3rdparty/v8/src/dateparser-inl.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/3rdparty/v8/src/dateparser-inl.h b/src/3rdparty/v8/src/dateparser-inl.h index 32f0f9e..3cb36fa 100644 --- a/src/3rdparty/v8/src/dateparser-inl.h +++ b/src/3rdparty/v8/src/dateparser-inl.h @@ -62,7 +62,8 @@ bool DateParser::Parse(Vector<Char> str, // sss is in the range 000..999, // hh is in the range 00..23, // mm, ss, and sss default to 00 if missing, and - // timezone defaults to Z if missing. + // timezone defaults to Z if missing + // (following Safari, ISO actually demands local time). // Extensions: // We also allow sss to have more or less than three digits (but at // least one). @@ -148,6 +149,9 @@ bool DateParser::Parse(Vector<Char> str, } else { // Garbage words are illegal if a number has been read. if (has_read_number) return false; + // The first number has to be separated from garbage words by + // whitespace or other separators. + if (scanner.Peek().IsNumber()) return false; } } else if (token.IsAsciiSign() && (tz.IsUTC() || !time.IsEmpty())) { // Parse UTC offset (only after UTC or time). |