function IsHour(Value: Integer; AMPM: Boolean=False): Boolean
The IsHour function returns True if the input parameter is a valid hour number for the specified clock. If the AMPM parameter is false, the valid hour numbers are 0-23, and if the AMPM parameter is True, the valid hour numbers are 0-12.