Standard built-ins
Date
Represents milliseconds since the Unix epoch or invalid time. A single numeric argument is milliseconds; multiargument form interprets local fields. Calling Date without new returns a current date string.
Formal Syntax & Structure
javascript syntaxjavascript
new Date(value)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | Number | String | Date | Timestamp, date string or Date copy; other constructor overloads exist. |
Return Value
Date
New Date when constructed.
Working Example
Example Snippetjavascript
console.log(new Date(0).toISOString());