JSFiddle - React, Tailwind, and code Playground
by Academia
HTML
<p id="withHour"></p>
<p id="withoutHour"></p>
JavaScript
var date = new Date();
document.getElementById("withHour").innerHTML = JSON.stringify(date);
var date = new Date();
date.setUTCHours(0,0,0,0);
document.getElementById("withoutHour").innerHTML = JSON.stringify(date);