The getHours() function of date object returns hours of the specified date. Use it for example to get hours of the specified date.
Syntax