New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 41754 link

Starred by 6 users

Issue metadata

Status: Fixed
Last visit > 30 days ago
Closed: May 2010
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment

Date.parse can't parse Date.toJSON() output

Reported by, Apr 16 2010

Issue description

Chrome Version       : 5.0.378.0 (Developer Build 44471)

Chromium	5.0.378.0 (Developer Build 44471)
WebKit	533.5
V8	2.2.2
User Agent	Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-US) AppleWebKit/533.5 
(KHTML, like Gecko) Chrome/5.0.378.0 Safari/533.5
Command Line	 /Applications/ -psn_0_48893598

URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
     Safari 4: OK
  Firefox 3.x: OK

What steps will reproduce the problem?
1. console.log(Date.parse((new Date()).toJSON()));

What is the expected result?

The console should show some representation of the current date

What happens instead?

The console shows NaN

Please provide any additional information below. Attach a screenshot if

I noticed that lately, Date.toJSON began to emit a timestamp in ISO form with microseconds while 
Date.parse() is unable to handle the ISO format (it should though according to the ES5 
I just noticed that it fails in Safari 4 too. Firefox is correct, though Date.toJSON() doesn't contain any time 
information there.
Hi, I have the same issue, easy reproduction:

> new Date("2010-04-23T10:05:00+00:00")
Invalid Date

In the javascript console :)

Comment 3 by, Apr 23 2010

Labels: Area-WebKit WebKit-JavaScript
Status: Untriaged

Comment 4 by, Apr 28 2010

Labels: Mstone-X
Status: Assigned
Rico, could you have a look at this?

Comment 6 by, May 3 2010

Status: Fixed
This was fixed in v8 bleeding_edge in revision 4547. The reason for this bug was that 
Date.parse did not have support for the ECMAScript 5 syntax for dates (i.e., T before 
the time and additionally Z for UTC).
Project Member

Comment 7 by, Oct 12 2012

Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member

Comment 8 by, Mar 11 2013

Labels: -Area-Undefined -Area-WebKit -WebKit-JavaScript Cr-Content-JavaScript Cr-Content
Project Member

Comment 9 by, Apr 6 2013

Labels: -Cr-Content Cr-Blink
Project Member

Comment 10 by, Apr 6 2013

Labels: -Cr-Content-JavaScript Cr-Blink-JavaScript

Sign in to add a comment