js how to work with date() code example
Example 1: js set datetime
//new Date(year, month, day, hours, minutes, seconds, milliseconds)
new Date(1776, 6, 4, 12, 30, 0, 0);
// Timestamp method
new Date(-6106015800000);
// Date string method
new Date("January 31 1980 12:30");
Example 2: new date parameters javascript
// new Date parameters in javascript
new Date(year, month, date, hours, minutes, seconds, ms)