From 6e73e451ae00eb2dfb1736a42ed3d20b9544517b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 10 Oct 2019 19:47:58 +0100 Subject: [PATCH] Day of month --- webinterface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webinterface.py b/webinterface.py index dffc6589..cf0081bb 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2744,7 +2744,7 @@ def htmlSearchEmojiTextEntry(translate: {}, \ emojiStr+=htmlFooter() return emojiStr -def weekDayOfMonthStart(monthNumber: int,year: int): +def weekDayOfMonthStart(monthNumber: int,year: int) -> int: """Gets the day number of the first day of the month 1=sun, 7=sat """ @@ -2825,7 +2825,7 @@ def htmlCalendar(translate: {}, \ calendarStr+=' \n' for dayNumber in range(1,7): if (weekOfMonth>1 and dayOfMonth<=daysInMonth) or \ - (weekOfMonth==1 and dayNumber>=weekDayOfMonthStart(monthNumber,year)): + (weekOfMonth==1 and dayOfMonth>=weekDayOfMonthStart(monthNumber,year)): dayOfMonth+=1 calendarStr+=' '+str(dayOfMonth)+'\n' else: