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
.
Each large tick mark represents \dfrac{60}{12} = 5
minutes.
Each small tick mark represents 1
minute.
The minute hand is pointing at the 12
, so 0
minutes have past since the hour.
The minute hand is pointing at BIG_TICK
,
which represents BIG_TICK \times 5 = MINUTE
minutes.
The minute hand is SMALL_TICK
small tick past the
BIG_TICK === 0 ? 12 : BIG_TICK
,
which represents BIG_TICK \times 5 + SMALL_TICK = MINUTE
minutes.
The minute hand is SMALL_TICK
small ticks past the
BIG_TICK === 0 ? 12 : BIG_TICK
,
which represents BIG_TICK \times 5 + SMALL_TICK = MINUTE
minutes.
The time is HOUR
:NICE_MINUTE
.