Name
Date.parse() — parse a date/time string
Synopsis
Date.parse(date)
Arguments
dateA string containing the date and time to be parsed.
Returns
The number of milliseconds between the specified date and time and midnight GMT on January 1, 1970.
Description
Date.parse()is a static
method of Date. It parses the date specified by its single string
argument returns it as the number of milliseconds since the epoch.
This return value can be used directly, used to create a new Date
object, or used to set the date in an existing Date object with
Date.setTime().
ECMAScript 5 requires this method to be able to parse strings
returned by the Date.toISOString() method. In ECMAScript 5
and before, this method is also required to be able to parse the
implementation-dependent strings returned by the toUTCString() and toString() methods.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access