Date object

Represents date and time. Local and UTC timezones supported.

Properties
day - integer, number of the day, from 1 up to number of days in current month. Read/write property. local
time
month - integer, number of the month, from 1 to 12. Read/write property.
year - integer, full number of the year, e.g. 2005. Read/write property.
hour - integer, hour, from 0 to 23. Read/write property.
minute - integer, minute, from 0 to 59. Read/write property.
second - integer, second, from 0 to 59. Read/write property.
millisecond - integer, millisecond, from 0 to 999. Read/write property.
dayOfWeek - integer, number of day of the week, from 1 to 7. 1 is Sunday. Read-only property.
UTCday - integer, number of the day, from 1 up to number of days in current month. Read/write property. UTC
time
UTCmonth - integer, number of the month, from 1 to 12. Read/write property.
UTCyear - integer, full number of the year, e.g. 2005. Read/write property.
UTChour - integer, hour, from 0 to 23. Read/write property.
UTCminute - integer, minute, from 0 to 59. Read/write property.
UTCsecond - integer, second, from 0 to 59. Read/write property.
UTCmillisecond - integer, millisecond, from 0 to 999. Read/write property.
UTCdayOfWeek - integer, number of day of the week, from 1 to 7. 1 is Sunday. Read-only property.
Methods
Date

( [string |  [ year, month, day [, hour [, minute [, second [, millisecond ]]]]]] )

Creates new date object. If no parameters were given then initializes date fields to the current time (UTC).
If single string parameter provided then parses date contained in the string.
And if year, month, day, etc. provided uses these numeric values to initialize new Date instance.

toString
toUTCString
()

Returns unified string representation of this date object (UTC).

toLocaleString

( [longFormat] ) returns: string

Returns string representation of the date using current user system settings. Local time.
If longFormat is equal exactly true then formats date using system long date format.

valueOf
() returns: float

Returns stored time value in milliseconds since midnight, January 1, 1970 UTC.

parse

( string ) returns: float | undefined

Static method. Tries to parse date in string. If result of parsing is successfull then returns date as number of milliseconds since midnight, January 1, 1970 UTC.
On error returns undefiend value.

UTC

( year, month, day [, hour [, minute [, second [, millisecond ]]]]] ) returns: float | undefined

Static method. Returns number of milliseconds since midnight, January 1, 1970 UTC up to date defined by parameters

setTime

( milliseconds ) returns: float

Sets this date object fields equal to date defined by milliseconds parameter. milliseconds is a number (float) of milliseconds since midnight, January 1, 1970 UTC.

monthName
( longFormat ) returns: string

Returns name of the month in current user's locale. If longFormat is equal true returns full month name, otherwise - it's abbreviation.

dayOfWeekName
( longFormat ) returns: string

Returns name of the day in current user's locale. If longFormat is equal true returns full week day name, otherwise - it's abbreviation.