const ts = Date.now();
const dt = new Date(ts);
const day = dt.getDate();
const month = dt.getMonth() + 1;
const year = dt.getFullYear();
console.log(year + "-" + month + "-" + day);
const hour = dt.getHours();
const minuts = dt.getMinutes();
const second = dt.getSeconds();
console.log(hour + ":" + minuts + ":" + second);
/*
run:
2020-3-19
10:59:8
*/