Date
Enables basic storage and retrieval of dates and times.
Value members
Concrete methods
Gets the milliseconds of 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 minutes of a Date object, using local time.
Gets the seconds of a Date object, using local time.
Gets the seconds of a Date object, using local time.
Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).
Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC).
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
Gets the day-of-the-month, using Universal Coordinated Time (UTC).
Gets the day of the week 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 year using Universal Coordinated Time (UTC).
Gets the hours value in a Date object 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 milliseconds of a Date object using Universal Coordinated Time (UTC).
Gets the minutes 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 month of a Date object using Universal Coordinated Time (UTC).
Gets the seconds 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 numeric day-of-the-month value of the Date object using local time.
- Value Params
- date
A numeric value equal to the day of the month.
Sets the year of the Date object using local time.
Sets the year of the Date object using local time.
- Value Params
- date
A numeric value equal for the day of the month.
- month
A zero-based numeric value for the month (0 for January, 11 for December). Must be specified if numDate is specified.
- year
A numeric value for the year.
Sets the hour value in the Date object using local time.
Sets the hour value in the Date object using local time.
- Value Params
- hours
A numeric value equal to the hours value.
- min
A numeric value equal to the minutes value.
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Sets the milliseconds value in the Date object using local time.
Sets the milliseconds value in the Date object using local time.
- Value Params
- ms
A numeric value equal to the millisecond value.
Sets the minutes value in the Date object using local time.
Sets the minutes value in the Date object using local time.
- Value Params
- min
A numeric value equal to the minutes value.
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Sets the month value in the Date object using local time.
Sets the month value in the Date object using local time.
- Value Params
- date
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.
- month
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
Sets the seconds value in the Date object using local time.
Sets the seconds value in the Date object using local time.
- Value Params
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Sets the date and time value in the Date object.
Sets the date and time value in the Date object.
- Value Params
- time
A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- Value Params
- date
A numeric value equal to the day of the month.
Sets the year value in the Date object using Universal Coordinated Time (UTC).
Sets the year value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- date
A numeric value equal to the day of the month.
- month
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.
- year
A numeric value equal to the year.
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
Sets the hours value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- hours
A numeric value equal to the hours value.
- min
A numeric value equal to the minutes value.
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- ms
A numeric value equal to the millisecond value.
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- min
A numeric value equal to the minutes value.
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Sets the month value in the Date object using Universal Coordinated Time (UTC).
Sets the month value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- date
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.
- month
A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
Sets the seconds value in the Date object using Universal Coordinated Time (UTC).
- Value Params
- ms
A numeric value equal to the milliseconds value.
- sec
A numeric value equal to the seconds value.
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization.
Returns a date as a string value appropriate to the host environment's current locale.
Returns a date as a string value appropriate to the host environment's current locale.
Returns a time as a string value appropriate to the host environment's current locale.
Returns a time as a string value appropriate to the host environment's current locale.
Inherited methods
Concrete fields
Converts a Date object to a string or number.
Converts a Date object to a string or number.
- Value Params
- hint
The strings "number", "string", or "default" to specify what primitive to return.
- Throws
- {TypeError}
If 'hint' was given something other than "number", "string", or "default".