Internal
The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
The month as a number between 0 and 11 (January to December).
Optional
date: numberThe date as a number between 1 and 31.
Optional
hours: numberMust be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
Optional
minutes: numberMust be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
Optional
seconds: numberMust be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
Optional
ms: numberA number from 0 to 999 that specifies the milliseconds.
Converts a Date object to a string.
Converts a Date object to a string.
Converts a Date object to a number.
Converts a Date object to a string or number.
The strings "number", "string", or "default" to specify what primitive to return.
A number if 'hint' was "number", a string if 'hint' was "string" or "default".
Gets the day-of-the-month, using local time.
Gets the day of the week, using local time.
Gets the year, using local time.
Gets the hours in a date, using local time.
Gets the milliseconds of a Date, using local time.
Gets the minutes of a Date object, using local time.
Gets the month, using local time.
Gets the seconds of a Date object, using local time.
Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.
Gets the difference in minutes between Universal Coordinated Time (UTC) and the time on the local computer.
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
Gets the day of the week using Universal Coordinated Time (UTC).
Gets the year using Universal Coordinated Time (UTC).
Gets the hours value in a Date object using Universal Coordinated Time (UTC).
Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).
Gets the minutes of a Date object using Universal Coordinated Time (UTC).
Gets the month of a Date object using Universal Coordinated Time (UTC).
Gets the seconds of a Date object using Universal Coordinated Time (UTC).
Sets the numeric day-of-the-month value of the Date object using local time.
Sets the year of the Date object using local time.
Sets the hour value in the Date object using local time.
Sets the milliseconds value in the Date object using local time.
Sets the minutes value in the Date object using local time.
Sets the month value in the Date object using local time.
Sets the seconds value in the Date object using local time.
Sets the date and time value in the Date object.
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
Sets the year value in the Date object using Universal Coordinated Time (UTC).
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
Sets the month value in the Date object using Universal Coordinated Time (UTC).
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
Returns a date as a string value.
Returns a date as a string value in ISO format.
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
Optional
key: anyReturns a date as a string value appropriate to the host environment's current locale.
Converts a date to a string by using the current or specified locale.
Optional
locales: string | string[]A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Converts a date to a string by using the current or specified locale.
Optional
locales: LocalesArgumentA locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns a value as a string value appropriate to the host environment's current locale.
Converts a date and time to a string by using the current or specified locale.
Optional
locales: string | string[]A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Converts a date and time to a string by using the current or specified locale.
Optional
locales: LocalesArgumentA locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns a time as a string value appropriate to the host environment's current locale.
Converts a time to a string by using the current or specified locale.
Optional
locales: string | string[]A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Converts a time to a string by using the current or specified locale.
Optional
locales: LocalesArgumentA locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
Optional
options: DateTimeFormatOptionsAn object that contains one or more properties that specify comparison options.
Returns a string representation of a date. The format of the string depends on the locale.
Returns a time as a string value.
Returns a date converted to a string using Universal Coordinated Time (UTC).
Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.
Static
nowReturns the number of milliseconds elapsed since midnight, January 1, 1970 Universal Coordinated Time (UTC).
Static
parseParses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
A date string
Static
UTCReturns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
The month as a number between 0 and 11 (January to December).
Optional
date: numberThe date as a number between 1 and 31.
Optional
hours: numberMust be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
Optional
minutes: numberMust be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
Optional
seconds: numberMust be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
Optional
ms: numberA number from 0 to 999 that specifies the milliseconds.
Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
Optional
monthIndex: numberThe month as a number between 0 and 11 (January to December).
Optional
date: numberThe date as a number between 1 and 31.
Optional
hours: numberMust be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
Optional
minutes: numberMust be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
Optional
seconds: numberMust be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
Optional
ms: numberA number from 0 to 999 that specifies the milliseconds.
Creates a new Date.