The JavaScript Date type stores dates as the number of milliseconds since midnight on January 1, 1970 UTC (Universal Time Code).
To create a date object:
var aDate = new Date();
document.writeln(aDate)
The created object aDate is assigned the current date and time.