We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ddb47d1 + 6f1a132 commit 1b40859Copy full SHA for 1b40859
1 file changed
CircuitPython_OLED_Watch/CircuitPython_OLED_Watch.py
@@ -43,8 +43,8 @@
43
if current.tm_hour / 12 >= 1:
44
am_pm = "PM"
45
46
- time_display = "%d:%02d:%02d %s" % (hour, current.tm_min, current.tm_sec, am_pm)
47
- date_display = "%d/%d/%d" % (current.tm_mon, current.tm_mday, current.tm_year)
+ time_display = "{:d}:{:02d}:{:02d} {}".format(hour, current.tm_min, current.tm_sec, am_pm)
+ date_display = "{:d}/{:d}/{:d}".format(current.tm_mon, current.tm_mday, current.tm_year)
48
text_display = "CircuitPython Time"
49
50
clock = label.Label(font, text=time_display)
0 commit comments