|
@@ -261,7 +261,8 @@ def processMeterData(data):
|
|
|
else:
|
|
|
# get highest week number of last year
|
|
|
lastweek_year = year - 1
|
|
|
- lastyearlastweek = datetime.date.fromisoformat(str(lastweek_year) + "-12-31").isocalendar().week
|
|
|
+ #lastyearlastweek = datetime.date.fromisoformat(str(lastweek_year) + "-12-31").isocalendar().week #### named tuple output needs python 3.9+, on RPi only 3.7.3 is currently available
|
|
|
+ lastyearlastweek = datetime.date.fromisoformat(str(lastweek_year) + "-12-31").isocalendar()[1] ## for Python 3.7.3
|
|
|
lastweek = lastyearlastweek
|
|
|
lastweek_d = str(lastweek_year) + "-W" + str(lastweek)
|
|
|
#lastweek_day1 = datetime.date.fromisocalendar(lastweek_year, lastweek, 1) # works only from python 3.8 - RPi only has 3.7.3
|