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

Unified Diff: src/date.js

Issue 1704016: Added support for ES5 date time string format to Date.parse. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 8 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 | src/dateparser.h » ('j') | test/mjsunit/date-parse.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.js
===================================================================
--- src/date.js (revision 4543)
+++ src/date.js (working copy)
@@ -620,7 +620,7 @@
// -------------------------------------------------------------------
// Reused output buffer. Used when parsing date strings.
-var parse_buffer = $Array(7);
+var parse_buffer = $Array(8);
// ECMA 262 - 15.9.4.2
function DateParse(string) {
@@ -628,13 +628,13 @@
if (IS_NULL(arr)) return $NaN;
var day = MakeDay(arr[0], arr[1], arr[2]);
- var time = MakeTime(arr[3], arr[4], arr[5], 0);
+ var time = MakeTime(arr[3], arr[4], arr[5], arr[6]);
var date = MakeDate(day, time);
- if (IS_NULL(arr[6])) {
+ if (IS_NULL(arr[7])) {
return TimeClip(UTC(date));
} else {
- return TimeClip(date - arr[6] * 1000);
+ return TimeClip(date - arr[7] * 1000);
}
}
« no previous file with comments | « no previous file | src/dateparser.h » ('j') | test/mjsunit/date-parse.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698