The Date.parse() way parses a sequence representation of a date, and comes back the sheer number of milliseconds since January 1, 1970, 00:00:00 UTC or NaN in the event the sequence was unrecognized or, oftentimes, have unlawful time prices (e.g. 2015-02-31).
It is really not suggested to make use of go out.parse as until ES5, parsing of chain ended up being completely implementation centered. There are most differences in how different hosts parse big date strings, therefore day chain ought to be manually parsed (a library can really help if many different types can be covered).
a string representing a simplification for the ISO 8601 calendar big date extended format. (different formats can be utilized, but answers are implementation-dependent.)
A variety representing the milliseconds elapsed since January 1, 1970, 00:00:00 UTC while the big date obtained by parsing the given sequence representation of a date. In the event that discussion does not signify a legitimate time, NaN is actually came back.
The parse() approach takes a romantic date string (such ” 2011-10-10T14:48:00 “) and comes back the number of milliseconds since January 1, 1970, 00:00:00 UTC.
This features is beneficial for position date standards according to sequence standards, including with the setTime() way and also the big date item.
Big Date Opportunity Sequence Style
The standard string representation of a romantic date opportunity sequence is a simplification on the ISO 8601 diary go out longer format. (look at section big date opportunity String Format inside ECMAScript requirements for much more information.)