Initialize the current date but set time to midnight
JavaScript
const midnightOfToday = () => new Date(new Date().setHours(0, 0, 0, 0))
TypeScript
const midnightOfToday = (): Date => new Date(new Date().setHours(0, 0, 0, 0))
const midnightOfToday = () => new Date(new Date().setHours(0, 0, 0, 0))
const midnightOfToday = (): Date => new Date(new Date().setHours(0, 0, 0, 0))