The date Object
| Properties |
Methods |
Description |
| |
|
|
| |
getDate() |
Returns the day of the month from 1 to 31 |
| |
getDay() |
Return the days of the week from 0 to 6 [Sunday=0], etc |
| |
getHours() |
Returns the hour from 0 to 23 |
| |
getMinutes() |
Returns the Minute from 0-59 |
| |
getMonth() |
Returns the value of the month frpm 0 to 11 [January=0, etc] |
| |
getSeconds() |
Returns the seconds |
| |
getTime() |
Returns the date as an integer representing the number of milliseconds since January 1st, 1970 at 00:00:00 |
| |
getTimeoneOffset() |
Returns the difference between the local time and Greenwich Mean Time in minutes |
| |
getYear() |
Returns the number of years since 1900 (in other words, 1996 is represented by "96") This value method is inconsistently applied past the year 1999. |
| |
setDate(date) |
Set the day of the month to the value specified in date |
| |
setHour(hour) |
Set the hour to the value specified in hour |
| |
setMinutes(minutes) |
Set the minute to the value specified in minutes |
| |
setMonth(month) |
Set the month to the value specified in month |
| |
setSeconds(seconds) |
Set the second to the value specified in seconds |
| |
setTime(time) |
Sets the time to the value specified in time, where time is a variable containing the number of milliseconds since January 1st, 1970 at 00:00:00 |
| |
setYear(year) |
Set the year to the value specified in year |
| |
toGMTString()) |
Converts the date to a string in Greenwich Mean Time |
| |
toLocaleString() |
Converts a date object's date to a text string, using the date format that the Web Browser is setup to use. |
| |
UTC() |
Returns the date in the form of the milliseconds since January 1st, 1970 (00:00:00) |
| |
parse(date) |
commonly used in combination with the setTime() method. The parse method can convert a traditional date string into millisecond format use with the setTime() method |