JavaScript – Date getTime() Method
The Date getTime() method returns the number of milliseconds since January 1, 1970 00:00:00.
The Date getTime() method returns the number of milliseconds since January 1, 1970 00:00:00.
The Date getTimezoneOffset() method returns the difference between UTC time and local time in minutes.
The Date getUTCDate() method returns the day of the month (1 to 31) of a Date object, according to UTC.
The Date getUTCDay() method returns the day of the week (0 to 6) of a Date object, according to UTC: Sunday = 0, Monday = 1 … Saturday = 6.
The Date getUTCFullYear() method returns the full year (4 digits) 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 getUTCMilliseconds() method returns the milliseconds (0 to 999) of a Date object, according to UTC.
The Date getUTCMinutes() method returns the minutes (0 to 59) of a Date object, according to UTC.
The Date getUTCMonth() method returns the month (0 to 11) of a Date object, according to UTC: January = 0, February = 1, March = 2 … December = 11.
The Date getUTCSeconds() method returns the seconds (0 to 59) of a Date object, according to UTC.
The Date now() method returns the number of milliseconds since January 1, 1970 00:00:00.
The Date parse() method parses a date string and returns the number of milliseconds since January 1, 1970 00:00:00.
The Date.prototype() property allows you to add new properties and methods to the Date object.
The Date setDate() method sets the day of the month (1 to 31) of a Date object.
The Date setFullYear() method sets the full year (4 digits) of a date, and can also set the month and Date object.
The Date getHours() method returns the hour (0 to 23) of a Date object: 12am = 0, 1am = 1, 2am = 2 … 11pm = 23.
The Date setMilliseconds() method sets the milliseconds (0 to 999) of a Date object.
The Date setMinutes() method sets the minutes (0 to 59) of a Date object, and can also be used to set the seconds and milliseconds.
The Date setMonth() method sets the month (0 to 11) of a Date object: January = 0, February = 1, March = 2 … December = 11.
The Date setSeconds() method sets the seconds (0 to 59) of a Date object, and can also set the milliseconds.