Date.parse() results in NaN

Viewed 32401
Date.parse();

My jsFiddle works fine, but run it in my ide (both Aptana and WebStorm) shows NaN in the console.log() output.

Really confused about this... Has someone had such experience before?

2 Answers

The date should be in the IETF date syntax (RFC2822 Section 3.3) format, e.g. "Mon, 25 Dec 1995 13:30:00 GMT", or "Mon, 25 Dec 1995 13:30:00 GMT+0430".

Read more: Date.parse()

Surprisingly this should be done also for the current (2017) versions of IE (11.x) and FF (56.x) for the Date.parse to work correctly.

Related