Skip to content

Commit e3f680b

Browse files
authored
Merge pull request #96 from pimoroni/patch/fix-hour
word_clock.py: fix hour showing incorrectly when minutes zero
2 parents da45581 + 335aa89 commit e3f680b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/word_clock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def approx_time(hours, minutes):
6666

6767
if hours == 12:
6868
hours = 0
69-
if minutes > 0 and minutes < 8:
69+
if minutes >= 0 and minutes < 8:
7070
return "it is about " + nums[hours] + " O'Clock"
7171
elif minutes >= 8 and minutes < 23:
7272
return "it is about quarter past " + nums[hours]

0 commit comments

Comments
 (0)