Index: src/dateparser-inl.h |
diff --git a/src/dateparser-inl.h b/src/dateparser-inl.h |
index 32f0f9ea8f521b122c5d9c035183a5e06e95f9cc..a5c7143bdd37743a0b334696ec6e83ecd181b96e 100644 |
--- a/src/dateparser-inl.h |
+++ b/src/dateparser-inl.h |
@@ -148,6 +148,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). |