js date instance code example
Example 1: new date parameters javascript
// new Date parameters in javascript
new Date(year, month, date, hours, minutes, seconds, ms)
Example 2: javascript date
const d = new Date();
d.getFullYear(); // 2020
d.getMonth(); // October
d.getDate(); // 4
d.getHours(); // 11
d.getMinutes(); // 20
d.getSeconds(); // 12
d.getMilliseconds(); // 0
d.getTime(); // ????????????
Example 3: new date javascript
/*Get date from JS API - Date() class*/
let local_date = new Date();
alert("it is " + local_date + "!")