The Date.parse() system parses a sequence representation of a date, and returns the amount of milliseconds since January 1, 1970, 00:00:00 UTC or NaN in the event that sequence is actually unrecognized or, in some cases, has unlawful date beliefs (e.g. 2015-02-31).
It is not suggested to make use of day.parse as until ES5, parsing of chain had been completely implementation established. You may still find lots of differences in how different hosts parse go out strings, consequently time strings must certanly be by hand parsed (a library will if a variety of platforms are to be covered).
Syntax
Details
a sequence representing a simplification associated with ISO 8601 calendar big date prolonged format. (Some other platforms works extremely well, but results are implementation-dependent.)
Return worth
Several symbolizing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC in addition to go out gotten by parsing the considering string representation of a romantic date. If discussion does not represent a valid big date, NaN try returned.
Outline
The parse() means requires a date sequence (instance “ 2011-10-10T14:48:00 „) and returns the quantity of milliseconds since January 1, 1970, 00:00:00 UTC.
This features is advantageous for placing big date values considering string standards, for example with the setTime() means additionally the Date object.Continue reading