setTime() method sets the
to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC.
An integer representing the number of milliseconds since 1 January 1970, 00:00:00 UTC.
The number of milliseconds between 1 January 1970 00:00:00 UTC and the updated date (effectively, the value of the argument).
setTime() method to help assign a date and time to another
const theBigDay = new Date("July 1, 1999"); const sameAsBigDay = new Date(); sameAsBigDay.setTime(theBigDay.getTime());
|ECMAScript Language Specification |
BCD tables only load in the browser