Standard built-ins
Date.parse()
Interpret date text as a timestamp or NaN. Prefer specified ISO date-time format with explicit zone; other forms can be implementation-dependent.
Formal Syntax & Structure
javascript syntaxjavascript
Date.parse(text)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| text | String | Date-time string. |
Return Value
Number
Timestamp or NaN.
Working Example
Example Snippetjavascript
console.log(Date.parse("1970-01-01T00:00:02Z"));