I. Overview of Date objects
1. JavaScript provides a date type to handle time and date. The Date object contains a series of methods to get and set date-time information.
2. The Date type in JavaScript was built on the basis of the Java.util.Date class in early Java.
3, the date type uses UTC (coordinated Universal time, international coordination times [also known as World Unification Time]) January 1, 1970 midnight (0 O'Clock) to start the milliseconds to save the dates.
4. In the case of this data storage format, the date type can be saved in exactly 285,616 years before or after January 1, 1970.
Second, create a Date object
Create a Date object, using the new operator and the date construction method (constructor).
var New // returns the system current time format when creating a Date object without passing parameters : Thu Mar 20:18:08 gmt+0800 different browsers show different alert (box); // new can be omitted var time = Date (), alert (time);
The Date object for JavaScript