Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: src/dateparser-inl.h

Issue 3318017: make Date.parse properly handle TZ offsets... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-857.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/dateparser-inl.h
===================================================================
--- src/dateparser-inl.h (revision 5423)
+++ src/dateparser-inl.h (working copy)
@@ -65,8 +65,10 @@
tz.SetAbsoluteMinute(n);
} else if (time.IsExpecting(n)) {
time.AddFinal(n);
- // Require end, white space or Z immediately after finalizing time.
- if (!in.IsEnd() && !in.SkipWhiteSpace() && !in.Is('Z')) return false;
+ // Require end, white space, "Z", "+" or "-" immediately after
+ // finalizing time.
+ if (!in.IsEnd() && !in.SkipWhiteSpace() && !in.Is('Z') &&
+ !in.IsAsciiSign()) return false;
} else {
if (!day.Add(n)) return false;
in.Skip('-'); // Ignore suffix '-' for year, month, or day.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-857.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698