Date and Time Methods
The following table describes date and time methods.
Method | Description |
---|---|
Converts a date and time to GMT. |
|
Converts an integer to local time. |
|
Converts a time object to an integer. |
|
Computes the difference between two times. |
|
Writes a formatted date and time to a string. |
|
Returns a string that includes the local date and time. |
|
Returns the current processor tick count. |
|
Converts a date and time to a string. |
|
Converts a date string to a date object. |
|
Converts a date object to a GMT string. |
|
Converts a date object to an integer. |
|
Converts an integer date to a JavaScript date. |
|
Converts a UTC date to a format that a human can read. |
|
Returns the day of the month. |
|
Returns the day of the week. |
|
Returns the year as a four digit number. |
|
Returns the hour. |
|
Returns the millisecond. |
|
Returns the minute. |
|
Returns the month. |
|
Returns the second. |
|
Returns the date and time, in milliseconds, of a date object. |
|
Returns the difference, in minutes, from GMT. |
|
Returns the UTC day of the month. |
|
Returns the UTC day of the week. |
|
Returns the UTC year as a four digit number. |
|
Returns the UTC hour. |
|
Returns the UTC millisecond. |
|
Returns the UTC minute. |
|
Returns the UTC month. |
|
Returns the UTC second. |
|
Returns the year as a two digit number. |
|
Sets the day of the month. |
|
Sets the year as a four digit number. |
|
Sets the hour. |
|
Sets the millisecond. |
|
Sets the minute. |
|
Sets the month. |
|
Sets the second. |
|
Sets the date and time in a date object, in milliseconds. |
|
Sets the UTC day of the month. |
|
Sets the UTC year as a four digit number. |
|
Sets the UTC hour. |
|
Sets the UTC millisecond. |
|
Sets the UTC minute. |
|
Sets the UTC month. |
|
Sets the UTC second. |
|
Sets the year as a two digit number. |