JavaScript – Date setTime() Method
The Date setTime() method sets a date and time by adding or subtracting a specified number of milliseconds to or from midnight January 1, 1970.
The Date setTime() method sets a date and time by adding or subtracting a specified number of milliseconds to or from midnight January 1, 1970.
The Date setUTCFullYear() method sets the full year (4 digits) of a Date object, according to UTC, and can also set the month and day.
The Date setUTCDate() method sets the day of the month (1 to 31) of a Date object, according to UTC.
The Date getUTCHours() method returns the hour (0 to 23) of a Date object, according to UTC: 12am = 0, 1am = 1, 2am = 2 … 11pm = 23.
The Date setUTCMilliseconds() method sets the milliseconds (0 to 999) of a Date object, according to UTC.
The Date setUTCMinutes() method sets the minutes (0 to 59) of a date, according to UTC, and can also set the seconds and milliseconds.
The Date setUTCMonth() method sets the month (0 to 11) of a Date object, according to UTC: January = 0, February = 1, March = 2 … December = 11.
The Date setUTCSeconds() method sets the seconds (0 to 59) of a Date object, according to UTC, and can also set the milliseconds.
The Date toDateString() method returns the date (not the time) of a Date object as a string.
The Date toISOString() method returns a Date object as a string, using the ISO standard format: YYYY-MM-DDTHH:mm:ss.sssZ.
The Date toJSON() method returns a Date object as a string, formatted as a JSON date, using the format: YYYY-MM-DDTHH:mm:ss.sssZ.
The Date toLocaleDateString() method returns the date (not the time) of a Date object as a string, using locale conventions.
The Date toLocaleString() method returns a date and time as a string, using locale settings.
The Date toLocaleTimeString() method returns the time portion of a Date object as a string, using locale conventions.
The Date toTimeString() method returns the time portion of a Date object as a string.
The Date toUTCString() method returns a Date object as a string, according to UTC.
The Date.UTC() method returns the number of milliseconds between a specified date and midnight of January 1, 1970, according to UTC.
The Date valueOf() method returns the primitive value of a Date object as the number of millisecond since midnight January 1, 1970 UTC.
The attributes getNamedItem() method returns an attribute node from a NamedNodeMap object.