Get Function |
|
Description | ||
value = getDate() |
|
Date in the month (1 to 31) | ||
value = getDay() |
|
Day in the week (0 to 6) | ||
value = getHours() |
|
Hour within the day (0 to 23) | ||
value = getMinutes() |
|
Minutes within the hour (0 to 59) | ||
value = getMonth() |
|
Month in the year (0 to 11) | ||
value = getSeconds() |
|
Seconds in the minute (0 to 59) | ||
value = getTime() |
|
msec since 1 Jan. 1970 00:00:00 | ||
value = getYear() |
|
Years since 1900 (Netscape 4 - old). All four digits of the year (IE 5, Netscape 6 and Mozilla - current) | ||
value = getTimeZoneOffset() |
|
Minutes offset from GMT | ||
value = toGMTString() |
|
GMT time in a string | ||
value = toLocaleString() |
|
Local time in a string |
Constructors | Description | |
new Date() | Creates an object based on the current date and time | |
new Date("Month, dd, yyyy hh:mm:ss") | Creates a date with the specified date. (Any missing values are assumed to be zero.) | |
new Date("mm/dd/yyyy") | Creates a date with the specified date. | |
new Date("mm/dd/yy") | Creates a date with the specified date. The year is since 1900 (Netscape 4 - old). All four digits of the year (IE 5, Netscape 6 and Mozilla - current) | |
new Date(yy, mm, dd) | Creates a date with the specified date. | |
new Date(yy, mm, dd, hh, mm, ss) | Creates a date with the specified date. |
Note: Most values in date object are zero based.
Last Updated: $Date: 2002/08/23 06:34:23 $ GMT ($Revision: 1.6 $)