From 9c39c886d2f896d4846f1edf6552db40fd2ab53b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Oct 2019 19:34:50 +0100 Subject: [PATCH] Check for zero --- webinterface.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webinterface.py b/webinterface.py index f10d4308..f6e3ef17 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2774,10 +2774,10 @@ def htmlCalendar(translate: {}, \ first=False actor=actor.split('?')[0] - if year==1970 and monthNumber==1: - now=datetime.datetime.now() - year=now.year - monthNumber=now.month + if year==1970 and monthNumber==0: + currDate=datetime.datetime.now() + year=currDate.year + monthNumber=currDate.month print('Calendar year='+str(year)+' month='+str(monthNumber))