ratp: Display leading 0 on minutes

This commit is contained in:
nemunaire 2023-09-06 10:34:49 +02:00
parent 905a4d8c97
commit 3cd297c639

View File

@ -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()