Calculate the hour of the day.