From 6555eea8872afbc778dd0bb5bcfba0990e69ad16 Mon Sep 17 00:00:00 2001 From: Krateng Date: Sun, 17 Jan 2021 03:04:28 +0100 Subject: [PATCH] Fixed another time bug --- maloja/monkey.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maloja/monkey.py b/maloja/monkey.py index cfd8529..f4780b4 100644 --- a/maloja/monkey.py +++ b/maloja/monkey.py @@ -57,10 +57,10 @@ class expandeddate(date): firstdayofyear = datetime.date(y,1,1) wkday = firstdayofyear.isoweekday() if wkday <= 4: # day up to thursday -> this week belongs to the new year - firstisodayofyear = firstdayofyear - timedelta(days=wkday) #this alos shifts to sunday first weeks + firstisodayofyear = firstdayofyear - timedelta(days=wkday) #this also shifts to sunday-first weeks else: # if not, still old year firstisodayofyear = firstdayofyear + timedelta(days=7-wkday) #same - return firstisodayofyear + timedelta(days=(w-1)*7) + timedelta(days=d) + return firstisodayofyear + timedelta(days=(w-1)*7) + timedelta(days=d-1)