Methods
The following methods are defined in the Date class.
| Name | Description |
|---|---|
| Constructor | Initialize the Date object |
| GetTime | Returns the stored time |
| GetFullYear | Returns the year of the date in local time |
| GetMonth | Returns the month of the date in local time |
| GetDate | Returns the day part of a date in local time |
| GetDay | Returns the day of the week for a date in local time |
| GetHours | Returns the hour part of local time |
| GetMinutes | Returns the minutes part of local time |
| GetSeconds | Returns the seconds part of local time |
| GetMilliSeconds | Returns the millisecond portion of local time |
| GetUTCFullYear | Returns the year of the date in UTC |
| GetUTCMonth | Returns the month of the date in UTC |
| GetUTCDate | Returns the day part of a date in UTC |
| GetUTCDay | Returns the day of the week for a UTC date |
| GetUTCHours | Returns the hours component of a date in UTC |
| GetUTCMinutes | Returns the minutes component of a date in UTC |
| GetUTCSeconds | Returns the seconds component of a date in UTC |
| GetUTCMilliSeconds | Returns the milliseconds component of a date in UTC |
| GetTimezoneOffset | Returns the time zone offset as a value in minutes |
| SetTime | Set date and time directly |
| SetFullYear | Set the year part in local time |
| SetMonth | Set the month part in local time |
| SetDate | Set the date part in local time |
| SetHours | Set the hours part in local time |
| SetMinutes | Set the minutes part in local time |
| SetSeconds | Set the seconds part in local time |
| SetMilliSeconds | Set the milliseconds part in local time |
| SetUTCFullYear | Set the year part in UTC |
| SetUTCMonth | Set the month part in UTC |
| SetUTCDate | Set the day part in UTC |
| SetUTCHours | Set the hour part in UTC |
| SetUTCMinutes | Set the minutes part in UTC |
| SetUTCSeconds | Set the seconds part in UTC |
| SetUTCMilliSeconds | Set the milliseconds part in UTC |
| ToDateString | Returns the date as a string |
| ToInternetString | Returns the date as a string in RFC822 format Added since Version 4.1.0 Not supported in Mobile |
| ToLocaleDateString | Returns the date as a string in locale format |
| ToLocaleString | Returns the date and time as a locale-formatted string |
| ToLocaleTimeString | Returns the time as a string in locale format |
| ToString | Returns the date and time as a string |
| ToTimeString | Returns the time as a string |
| ToUTCString | Returns the date as a UTC string |
| ValueOf | Returns the time elapsed since UTC reference time, in milliseconds. |
Static Methods
| Name | Description |
|---|---|
| Parse | Parses the date string |
| UTC | Returns the interval between 0:00:00, January 1, 1970, UTC, and the specified date, in milliseconds. |