Interface Date
Hierarchy
- Date
Index
Methods
- get
Date - get
Day - get
Full Year - get
Hours - get
Milliseconds - get
Minutes - get
Month - get
Seconds - get
Time - get
Timezone Offset - getUTCDate
- getUTCDay
- getUTCFull
Year - getUTCHours
- getUTCMilliseconds
- getUTCMinutes
- getUTCMonth
- getUTCSeconds
- set
Date - set
Full Year - set
Hours - set
Milliseconds - set
Minutes - set
Month - set
Seconds - set
Time - setUTCDate
- setUTCFull
Year - setUTCHours
- setUTCMilliseconds
- setUTCMinutes
- setUTCMonth
- setUTCSeconds
- to
Date String - toISOString
- toJSON
- to
Locale Date String - to
Locale String - to
Locale Time String - to
String - to
Time String - toUTCString
- value
Of
Methods
getDate
-
Gets the day-of-the-month, using local time.
Returns number
getDay
-
Gets the day of the week, using local time.
Returns number
getFullYear
-
Gets the year, using local time.
Returns number
getHours
-
Gets the hours in a date, using local time.
Returns number
getMilliseconds
-
Gets the milliseconds of a Date, using local time.
Returns number
getMinutes
-
Gets the minutes of a Date object, using local time.
Returns number
getMonth
-
Gets the month, using local time.
Returns number
getSeconds
-
Gets the seconds of a Date object, using local time.
Returns number
getTime
-
Gets the time value in milliseconds.
Returns number
getTimezoneOffset
-
Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).
Returns number
getUTCDate
-
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
Returns number
getUTCDay
-
Gets the day of the week using Universal Coordinated Time (UTC).
Returns number
getUTCFullYear
-
Gets the year using Universal Coordinated Time (UTC).
Returns number
getUTCHours
-
Gets the hours value in a Date object using Universal Coordinated Time (UTC).
Returns number
getUTCMilliseconds
-
Gets the milliseconds of a Date object using Universal Coordinated Time (UTC).
Returns number
getUTCMinutes
-
Gets the minutes of a Date object using Universal Coordinated Time (UTC).
Returns number
getUTCMonth
-
Gets the month of a Date object using Universal Coordinated Time (UTC).
Returns number
getUTCSeconds
-
Gets the seconds of a Date object using Universal Coordinated Time (UTC).
Returns number
setDate
-
Sets the numeric day-of-the-month value of the Date object using local time.
Parameters
-
date: number
A numeric value equal to the day of the month.
Returns number
-
setFullYear
-
Sets the year of the Date object using local time.
Parameters
-
year: number
A numeric value for the year.
-
Optional month: number
A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
-
Optional date: number
A numeric value equal for the day of the month.
Returns number
-
setHours
-
Sets the hour value in the Date object using local time.
Parameters
-
hours: number
A numeric value equal to the hours value.
-
Optional min: number
A numeric value equal to the minutes value.
-
Optional sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
setMilliseconds
-
Sets the milliseconds value in the Date object using local time.
Parameters
-
ms: number
A numeric value equal to the millisecond value.
Returns number
-
setMinutes
-
Sets the minutes value in the Date object using local time.
Parameters
-
min: number
A numeric value equal to the minutes value.
-
Optional sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
setMonth
-
Sets the month value in the Date object using local time.
Parameters
-
month: number
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
-
Optional date: 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
-
setSeconds
-
Sets the seconds value in the Date object using local time.
Parameters
-
sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
setTime
-
Sets the date and time value in the Date object.
Parameters
-
time: number
A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
Returns number
-
setUTCDate
-
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
Parameters
-
date: number
A numeric value equal to the day of the month.
Returns number
-
setUTCFullYear
-
Sets the year value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
year: number
A numeric value equal to the year.
-
Optional month: 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.
-
Optional date: number
A numeric value equal to the day of the month.
Returns number
-
setUTCHours
-
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
hours: number
A numeric value equal to the hours value.
-
Optional min: number
A numeric value equal to the minutes value.
-
Optional sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
setUTCMilliseconds
-
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
ms: number
A numeric value equal to the millisecond value.
Returns number
-
setUTCMinutes
-
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
min: number
A numeric value equal to the minutes value.
-
Optional sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
setUTCMonth
-
Sets the month value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
month: number
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
-
Optional date: 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
-
setUTCSeconds
-
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
Parameters
-
sec: number
A numeric value equal to the seconds value.
-
Optional ms: number
A numeric value equal to the milliseconds value.
Returns number
-
toDateString
-
Returns a date as a string value.
Returns string
toISOString
-
Returns a date as a string value in ISO format.
Returns string
toJSON
-
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
Parameters
-
Optional key: any
Returns string
-
toLocaleDateString
-
Returns a date as a string value appropriate to the host environment's current locale.
Returns string
-
Converts a date to a string by using the current or specified locale.
Parameters
-
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: DateTimeFormatOptions
An object that contains one or more properties that specify comparison options.
Returns string
-
toLocaleString
-
Returns a value as a string value appropriate to the host environment's current locale.
Returns string
-
Converts a date and time to a string by using the current or specified locale.
Parameters
-
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: DateTimeFormatOptions
An object that contains one or more properties that specify comparison options.
Returns string
-
toLocaleTimeString
-
Returns a time as a string value appropriate to the host environment's current locale.
Returns string
-
Converts a time to a string by using the current or specified locale.
Parameters
-
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: DateTimeFormatOptions
An object that contains one or more properties that specify comparison options.
Returns string
-
toString
-
Returns a string representation of a date. The format of the string depends on the locale.
Returns string
toTimeString
-
Returns a time as a string value.
Returns string
toUTCString
-
Returns a date converted to a string using Universal Coordinated Time (UTC).
Returns string
valueOf
-
Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC.
Returns number
Generated using TypeDoc
Enables basic storage and retrieval of dates and times.