Wondering if there is a "Shorter" way to do this in order to create a date that has the hours, minutes, seconds, and milliseconds all set to 0:
const d = new Date();
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
d.setMilliseconds(0);
Wondering if there is a "Shorter" way to do this in order to create a date that has the hours, minutes, seconds, and milliseconds all set to 0:
const d = new Date();
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
d.setMilliseconds(0);
You can just do new Date(new Date().toDateString())
const d = new Date(new Date().toDateString())
console.log(d)
const d = new Date();
d.setHours(0);
d.setMinutes(0);
d.setSeconds(0);
d.setMilliseconds(0);
console.log(d);