ratp: Display leading 0 on minutes
This commit is contained in:
parent
905a4d8c97
commit
3cd297c639
@ -12,6 +12,9 @@ from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
def whenStr(date, now):
|
||||
if date < now + timedelta(days=1):
|
||||
if date.minute <= 9:
|
||||
return f"{date.hour}h0{date.minute}"
|
||||
else:
|
||||
return f"{date.hour}h{date.minute}"
|
||||
elif date < now + timedelta(days=7):
|
||||
weekday = date.weekday()
|
||||
|
Loading…
x
Reference in New Issue
Block a user