Skip to main content
Version: 4.0.1

Date.prototype.getHours()

The getHours() method returns the hour for the specified date, according to local time.

Syntax​

getHours()

Return value​

An integer number, between 0 and 23, representing the hour for the given date according to local time.