Interface Date
"[toPrimitive]"(hint: "default"): string;
"[toPrimitive]"(hint: "string"): string;
"[toPrimitive]"(hint: "number"): number;
"[toPrimitive]"(hint: string): string | number;
getDate(): number;
getDay(): number;
getFullYear(): number;
getHours(): number;
getMilliseconds(): number;
getMinutes(): number;
getMonth(): number;
getSeconds(): number;
getTime(): number;
getTimezoneOffset(): number;
getUTCDate(): number;
getUTCDay(): number;
getUTCFullYear(): number;
getUTCHours(): number;
getUTCMilliseconds(): number;
getUTCMinutes(): number;
getUTCMonth(): number;
getUTCSeconds(): number;
setDate(date: number): number;
setFullYear(year: number, month?: number, date?: number): number;
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
setMilliseconds(ms: number): number;
setMinutes(min: number, sec?: number, ms?: number): number;
setMonth(month: number, date?: number): number;
setSeconds(sec: number, ms?: number): number;
setTime(time: number): number;
setUTCDate(date: number): number;
setUTCFullYear(year: number, month?: number, date?: number): number;
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
setUTCMilliseconds(ms: number): number;
setUTCMinutes(min: number, sec?: number, ms?: number): number;
setUTCMonth(month: number, date?: number): number;
setUTCSeconds(sec: number, ms?: number): number;
toDateString(): string;
toISOString(): string;
toJSON(key?: any): string;
toLocaleDateString(): string;
toLocaleDateString(
locales?: string | string[],
options?: DateTimeFormatOptions,
): string;
toLocaleDateString(
locales?: LocalesArgument,
options?: DateTimeFormatOptions,
): string;
toLocaleString(): string;
toLocaleString(
locales?: string | string[],
options?: DateTimeFormatOptions,
): string;
toLocaleString(
locales?: LocalesArgument,
options?: DateTimeFormatOptions,
): string;
toLocaleTimeString(): string;
toLocaleTimeString(
locales?: string | string[],
options?: DateTimeFormatOptions,
): string;
toLocaleTimeString(
locales?: LocalesArgument,
options?: DateTimeFormatOptions,
): string;
toString(): string;
toTimeString(): string;
toUTCString(): string;
valueOf(): number;
}
 Index
Methods
 Methods
[toPrimitive] 
- "[toPrimitive]"(hint: "default"): string
- Parameters- hint: "default"
 - Returns string
- "[toPrimitive]"(hint: "string"): string
- Converts a Date object to a string. - Parameters- hint: "string"
 - Returns string
- "[toPrimitive]"(hint: "number"): number
- Converts a Date object to a number. - Parameters- hint: "number"
 - Returns number
- "[toPrimitive]"(hint: string): string | number
- Converts a Date object to a string or number. - Parameters- hint: stringThe strings "number", "string", or "default" to specify what primitive to return. 
 - Returns string | number- A number if 'hint' was "number", a string if 'hint' was "string" or "default". 
- hint: string
getDate 
getDay 
getFullYear  
getHours 
getMilliseconds 
getMinutes 
getMonth 
getSeconds 
getTime 
getTimezoneOffset  
getUTCDate
getUTCDay
getUTCFullYear 
getUTCHours
getUTCMilliseconds
getUTCMinutes
getUTCMonth
getUTCSeconds
setDate 
setFullYear  
- setFullYear(year: number, month?: number, date?: number): number
- Sets the year of the Date object using local time. - Parameters- year: numberA numeric value for the year. 
- Optionalmonth: number- A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified. 
- Optionaldate: number- A numeric value equal for the day of the month. 
 - Returns number
- year: number
setHours 
- setHours(hours: number, min?: number, sec?: number, ms?: number): number
- Sets the hour value in the Date object using local time. - Parameters- hours: numberA numeric value equal to the hours value. 
- Optionalmin: number- A numeric value equal to the minutes value. 
- Optionalsec: number- A numeric value equal to the seconds value. 
- Optionalms: number- A numeric value equal to the milliseconds value. 
 - Returns number
- hours: number
setMilliseconds 
setMinutes 
- setMinutes(min: number, sec?: number, ms?: number): number
- Sets the minutes value in the Date object using local time. - Parameters- min: numberA numeric value equal to the minutes value. 
- Optionalsec: number- A numeric value equal to the seconds value. 
- Optionalms: number- A numeric value equal to the milliseconds value. 
 - Returns number
- min: number
setMonth 
- setMonth(month: number, date?: number): number
- Sets the month value in the Date object using local time. - Parameters- month: numberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively. 
- Optionaldate: number- A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used. 
 - Returns number
- month: number
setSeconds 
setTime 
setUTCDate
setUTCFullYear 
- setUTCFullYear(year: number, month?: number, date?: number): number
- Sets the year value in the Date object using Universal Coordinated Time (UTC). - Parameters- year: numberA numeric value equal to the year. 
- Optionalmonth: number- A numeric value equal to the month. The value for January is 0, and other month values follow consecutively. Must be supplied if numDate is supplied. 
- Optionaldate: number- A numeric value equal to the day of the month. 
 - Returns number
- year: number
setUTCHours
- setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number
- Sets the hours value in the Date object using Universal Coordinated Time (UTC). - Parameters- hours: numberA numeric value equal to the hours value. 
- Optionalmin: number- A numeric value equal to the minutes value. 
- Optionalsec: number- A numeric value equal to the seconds value. 
- Optionalms: number- A numeric value equal to the milliseconds value. 
 - Returns number
- hours: number
setUTCMilliseconds
setUTCMinutes
- setUTCMinutes(min: number, sec?: number, ms?: number): number
- Sets the minutes value in the Date object using Universal Coordinated Time (UTC). - Parameters- min: numberA numeric value equal to the minutes value. 
- Optionalsec: number- A numeric value equal to the seconds value. 
- Optionalms: number- A numeric value equal to the milliseconds value. 
 - Returns number
- min: number
setUTCMonth
- setUTCMonth(month: number, date?: number): number
- Sets the month value in the Date object using Universal Coordinated Time (UTC). - Parameters- month: numberA numeric value equal to the month. The value for January is 0, and other month values follow consecutively. 
- Optionaldate: number- A numeric value representing the day of the month. If it is not supplied, the value from a call to the getUTCDate method is used. 
 - Returns number
- month: number
setUTCSeconds
toDateString  
toISOString
toJSON
toLocaleDateString   
- toLocaleDateString(): string
- Returns a date as a string value appropriate to the host environment's current locale. - Returns string
- toLocaleDateString(
 locales?: string | string[],
 options?: DateTimeFormatOptions,
 ): string
- Converts a date to a string by using the current or specified locale. - Parameters- Optionallocales: 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
- toLocaleDateString(
 locales?: LocalesArgument,
 options?: DateTimeFormatOptions,
 ): string
- Converts a date to a string by using the current or specified locale. - Parameters- Optionallocales: LocalesArgument- A 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
toLocaleString  
- toLocaleString(): string
- Returns a value as a string value appropriate to the host environment's current locale. - Returns string
- toLocaleString(
 locales?: string | string[],
 options?: DateTimeFormatOptions,
 ): string
- Converts a date and time to a string by using the current or specified locale. - Parameters- Optionallocales: 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
- toLocaleString(
 locales?: LocalesArgument,
 options?: DateTimeFormatOptions,
 ): string
- Converts a date and time to a string by using the current or specified locale. - Parameters- Optionallocales: LocalesArgument- A 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
toLocaleTimeString   
- toLocaleTimeString(): string
- Returns a time as a string value appropriate to the host environment's current locale. - Returns string
- toLocaleTimeString(
 locales?: string | string[],
 options?: DateTimeFormatOptions,
 ): string
- Converts a time to a string by using the current or specified locale. - Parameters- Optionallocales: 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
- toLocaleTimeString(
 locales?: LocalesArgument,
 options?: DateTimeFormatOptions,
 ): string
- Converts a time to a string by using the current or specified locale. - Parameters- Optionallocales: LocalesArgument- A 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. 
- Optionaloptions: DateTimeFormatOptions- An object that contains one or more properties that specify comparison options. 
 - Returns string
Converts a Date object to a string.