August 2016
Beginner to intermediate
847 pages
17h 28m
English
The Date constructor can be used with several types of input:
You can pass values for year, month, date of the month, hour, minute, second, and millisecond, like so:
> new Date(2015, 0, 1, 13, 30, 35, 505);
Thu Jan 01 2015 13:30:35 GMT-0800 (PST)
> new Date(1420147835505);
Thu Jan 01 2015 13:30:35 GMT-0800 (PST)
> new Date();
Fri Jan 11 2013 12:20:45 GMT-0800 (PST)