JavaScript Date
16 functions
new Datenew Date()Creates a new Date object representing the current date and time.
Date.nowDate.now()Returns the number of milliseconds elapsed since January 1, 1970.
getFullYeardate.getFullYear()Returns the year (4 digits) of the specified date.
getMonthdate.getMonth()Returns the month (0-11) in the specified date.
getDatedate.getDate()Returns the day of the month (1-31) for the specified date.
getDaydate.getDay()Returns the day of the week (0=Sunday - 6=Saturday).
getHoursdate.getHours()Returns the hour (0-23) in the specified date.
getMinutesdate.getMinutes()Returns the minutes (0-59) in the specified date.
getSecondsdate.getSeconds()Returns the seconds (0-59) in the specified date.
getTimedate.getTime()Returns the numeric value of the date as milliseconds since the epoch.
setFullYeardate.setFullYear(year)Sets the full year for a specified date.
setMonthdate.setMonth(month)Sets the month (0-11) for a specified date.
setDatedate.setDate(day)Sets the day of the month for a specified date.
toLocaleDateStringdate.toLocaleDateString(locale, options?)Returns a string with a locale-sensitive representation of the date.
toLocaleTimeStringdate.toLocaleTimeString(locale, options?)Returns a string with a locale-sensitive representation of the time.
toISOStringdate.toISOString()Returns a string in simplified extended ISO format.
