Date
The Date object allows you to create dates and access values such as year, month, day, and second. If you use the default constructor to create a Date object, the object has the system's current date and current time.
var now = new Date(); alert("Now: " + now.toUTCString()); var milliSecs = new Date(7789110879); alert("MilliSecs: " + milliSecs.toUTCString()); var soccerDay = new Date("June 14, 2018 16:00:00"); alert("Kick-Off: " + soccerDay.toUTCString()); var birthday = new Date(1981,1,25); alert("Birthday: " + birthday.toLocaleString()); var newYearsEve = new Date(2018,11,31,23,59,59,59); alert("New Year's Eve: " + newYearsEve.toUTCString());References