Returns the hour for the specified date according to local time.
Method of Date
Syntax
getHours()
Parameters
None
Description
The value returned by getHours is an integer between 0 and 23.
Examples
The second statement below assigns the value 23 to the variable hours, based on the value of the Date object Xmas95.