Skip to main content
Version: 3.28.0

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.