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)