Lets you work with dates and times. Date is a core object.
new Date() new Date("month day, year hours:minutes:seconds") new Date(yr_num, mo_num, day_num) new Date(yr_num, mo_num, day_num, hr_num, min_num, sec_num)
month, day, year, hours, minutes, seconds
String values representing part of a date.
yr_num, mo_num, day_num, hr_num, min_num, sec_num
Integer values representing part of a date. As an integer value, the month is represented by 0 to 11 with 0=January and 11=December.
If you supply no arguments, the constructor creates a Date object for today's date and time. If you supply some arguments, but not others, the missing arguments are set to 0. If you supply any arguments, you must supply at least the year, month, and day. You can omit the hours, minutes, and seconds.
The way JavaScript handles dates is very similar to the way Java handles dates: both languages have many of the same date methods, and both store dates internally as the number of milliseconds since January 1, 1970 00:00:00. Dates prior to 1970 are not allowed.