javascript Date.parse

Posted by user121196 on Stack Overflow See other posts from Stack Overflow or by user121196
Published on 2010-04-06T18:35:53Z Indexed on 2010/04/06 18:43 UTC
Read the original article Hit count: 406

Filed under:
|

Case One:

new Date(Date.parse("Jul 8, 2005"));

Output:

Fri Jul 08 2005 00:00:00 GMT-0700 (PST)

Case Two:

new Date(Date.parse("2005-07-08"));

Output:

Thu Jul 07 2005 17:00:00 GMT-0700 (PST)


Why is the second parse incorrect?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about date