The Date objects allow you to perform advanced time and date manipulations. The Date object can be created using the following syntax:
var CurrentTime = new Date(); var DateObject = new Date(2003, 12, 31, 13, 30, 25); // December 31, 2003, 13:30:25 |
Date | Creates a new date object and assigns it current date and time. |
Date | Creates a new date object and assigns it specified date and time. |
GetYear | Returns a year stored in this Date object |
GetMonth | Returns a month stored in this Date object |
GetDate | Returns a day of the month stored in this Date object |
GetHours | Returns hours stored in this Date object |
GetMinutes | Returns minutes stored in this Date object |
GetSeconds | Returns seconds stored in this Date object |
GetWeekday | Returns a weekday of the date stored in this Date object |
SetYear | Sets a year of this Date object |
SetMonth | Sets a month of this Date object |
SetDate | Sets a day of the month of this Date object |
SetHours | Sets hours of this Date object |
SetMinutes | Sets minutes of this Date object |
SetSeconds | Sets seconds of this Date object |
SetCurrentTime | Sets this Date object to the current system date and time |
Type (read only) | Returns always "date" |
Creates a new date object and assigns it current date and time.
Creates a new date object and assigns it specified date and time.
Returns a year stored in this Date object
Returns a month stored in this Date object
Returns a day of the month stored in this Date object
Returns hours stored in this Date object
Returns minutes stored in this Date object
Returns seconds stored in this Date object
Returns a weekday of the date stored in this Date object
Sets a year of this Date object
Sets a month of this Date object
Sets a day of the month of this Date object
Sets hours of this Date object
Sets minutes of this Date object
Sets seconds of this Date object
Sets this Date object to the current system date and time