new Date()
new Date(YEAR, MONTH, DAY)
A Date object represents a particular moment in time. This includes the hour, minute, second, and millisecond (one thousandth of a second).
The function that creates a new object is called a constructor. Calling the constructor with no arguments creates a date for right now. This example program shows some of the information that's stored in the Date object (things like day of the week and time zone).
Calling the constructor with a year, month and day creates a Date object for that date. One gotcha is that the month argument is zero-based. So January is 0, and December is 11. Here's an example program that displays the number of seconds until Christmas.