change NEXT_MONTH to actaul next month instead of CURRENT_TIME

This commit is contained in:
fram3d 2023-09-27 16:58:28 +02:00
parent 768f1c66e6
commit a70fd1369e
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -8,7 +8,7 @@ import datetime as dt
from dateutil import relativedelta
CURRENT_TIME = dt.date.today()
NEXT_MONTH = CURRENT_TIME
NEXT_MONTH = CURRENT_TIME + relativedelta.relativedelta(months=1, day=1)
DAYS_OF_WEEK_SR = ("PON", "UTO", "SRE", "ČET", "PET", "SUB", "NED")
MONTHS_SR = ("Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust",\
"Septembar", "Oktobar", "Novembar", "Decembar")
@ -45,7 +45,7 @@ def drawPoster(events, bg, fg):
_, _, w, _ = draw.textbbox((0, 0), header, font=fontFacade)
draw.text(((W-w)/2, 120), header, font=fontFacade, fill=fg)
subheader = f"Plan za {MONTHS_SR[NEXT_MONTH.month - 1]}"
subheader = f"Plan za {MONTHS_SR[NEXT_MONTH.month]}"
_, _, w, _ = draw.textbbox((0, 0), subheader, font=fontIosevka)
draw.text(((W-w)/2, 240), subheader, font=fontIosevka, fill=fg)