What time is it?
The time is: HOUR : NICE_MINUTE AM_PM
The small hand is for the hour, and the big hand is for the minutes.
The hour hand is pointing at HOUR
, so the hour is HOUR
.
The hour hand is between HOUR
and HOUR + 1 === 13 ? 1 : HOUR + 1
, so the hour is HOUR
.
The hour hand is close to but hasn't passed HOUR + 1 === 13 ? 1 : HOUR + 1
, so the hour is still HOUR
.
The minute hand starts pointing straight up for 0
minutes, and makes a complete circle in 1
hour.
For each quarter of the circle that the minute hand passes, add 15
minutes.
The minute hand has passed MINUTE / 15 fourth of a circle, which represents MINUTE
minutes.
The minute hand has passed MINUTE / 15 fourths of a circle, which represents MINUTE
minutes.
The time is HOUR
:NICE_MINUTE
.