From a70fd1369ee5b712c5c9abc42e3a7abf3ef29f2f Mon Sep 17 00:00:00 2001 From: fram3d Date: Wed, 27 Sep 2023 16:58:28 +0200 Subject: [PATCH] change NEXT_MONTH to actaul next month instead of CURRENT_TIME --- image_poster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_poster.py b/image_poster.py index 83dc547..181a848 100755 --- a/image_poster.py +++ b/image_poster.py @@ -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)