Date : Object
new Date()
to get a Date for the current time or Date.now()
to get the current time in milliseconds since 01 January, 1970 UTC.Constructors
Returns a new Date
object that represents the current date and time.
Example:
RunResults:
Returns a new Date
object that represents the specified date and time. month
0 is January, 1 is February, etc. date
is the calendar day, starting with 1 and will be at most 31.
Example:
RunResults:
Returns a new Date
object that is the specified number of milliseconds from 01 January, 1970 UTC.
Example:
RunResults:
Parses string
and returns a new Date object representing the specified date and time. See also Date.parse(string)
.
Example:
RunResults:
Instance Methods
Returns the date of this
in local time. Date is the calendar day, starting with 1 and will be at most 31.
Example:
RunResults:
Returns the day of the week of this
in local time. 0 = Sunday, 1 = Monday, 2 = Tuesday, etc.
Example:
RunResults:
Returns the month of this
in local time. 0 is January, 1 is February, etc.
Example:
RunResults:
Returns the number of minutes between local time and UTC time.
Example:
RunResults:
Returns the date of this
in UTC time. Date is the calendar day, starting with 1 and will be at most 31.
Example:
RunResults:
Returns the day of the week of this
in UTC time. 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday.
Example:
RunResults:
Returns the month of this
in UTC time. 0 is January, 1 is February, etc.
Example:
RunResults:
Sets the year (and optionally month and date) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the number of hours (and optionally minutes, seconds and milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the number of milliseconds of this
. The other time components remain unchanged. Returns the time value of this
.
Example:
RunResults:
Sets the number of minutes (and optionally seconds and milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the month (and optionally date) of this
. Month 0 is January, 1 is February, etc. The other time components remain unchanged.
Example:
RunResults:
Sets the number of seconds (and optionally milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Set this date to be the specified number of milliseconds from 01 January, 1970 UTC.
Example:
RunResults:
Sets the year (and optionally month and date) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the number of hours (and optionally minutes, seconds and milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the number of milliseconds of this
. The other time components remain unchanged. Returns the time value of this
.
Example:
RunResults:
Sets the number of minutes (and optionally seconds and milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Sets the month (and optionally date) of this
. Month 0 is January, 1 is February, etc. The other time components remain unchanged.
Example:
RunResults:
Sets the number of seconds (and optionally milliseconds) of this
. The other time components remain unchanged.
Example:
RunResults:
Returns a string representation if this
in ISO 8601 format.
Example:
RunResults:
Returns a string representation of this
suitable for storage in JSON.
Example:
RunResults:
Returns a human readable string of the date portion of this
in local time.
Example:
RunResults:
Returns a human readable string of this
in the local time.
Example:
RunResults:
Returns a human readable string of the time potion of this
in local time.
Example:
RunResults:
Returns the number of milliseconds since 01 January, 1970 UTC for this
. You can also obtain the value by using the date in a number context such as +date
. If you need the value of the current time, use Date.now()
to avoid the cost of creating a Date
object. See also getTime()
.
Example:
RunResults:
Date Methods
Returns the number of milliseconds from 01 January, 1970 of the current time in UTC.
Example:
RunResults:
Parses string
into a date and returns the number of milliseconds this date is from 01 January, 1970 UTC. Use new Date(string)
to get a Date object from a string.
Example:
RunResults:
Returns the number of milliseconds fom 01 January, 1970 UTC of the specified date and time in UTC. month
0 is January, 1 is February, etc. date
is the calendar day, starting with 1 and will be at most 31.