getDay
getHours
getMinutes
Returns the hour (0-23) in the specified date.
date.getHours()
Enter values below to update the example in real time.
const
new
console
const date = new Date(); console.log(date.getHours()); // current hour (0-23)