Ensure that rolback months are properly year-ed.
build_develop / build (push) Successful in 1m27s

This commit is contained in:
2024-01-01 13:32:17 -05:00
parent e836ead399
commit 8c654612a9
+3
View File
@@ -31,6 +31,9 @@ def get_datetime(day: str) -> datetime:
if datetime.today().month == 12 and month < 12: if datetime.today().month == 12 and month < 12:
year += 1 year += 1
if datetime.today().month == 1 and month > 1:
year -= 1
return datetime(year, month, day) return datetime(year, month, day)