DateTime.getHour

Retrieves the hour of the day represented by datetime in the gregorian calendar. The return is in the range of 0 to 23. Call Date.timeHasTime before, to avoid warnings.

class DateTime
int
getHour
()

Return Value

Type: int

the hour of the day