This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS setHours()

The setHours() method sets the hours of a date object:

const d = new Date();
d.setHours(22);
document.getElementById("demo").innerHTML = d;