Check for blank last row of calendar

main
Bob Mottram 2020-08-29 14:35:22 +01:00
parent e7da255a5f
commit 7ef0a275f0
1 changed files with 3 additions and 1 deletions

View File

@ -6647,7 +6647,9 @@ def htmlCalendar(translate: {},
dayOfMonth = 0
dow = weekDayOfMonthStart(monthNumber, year)
for weekOfMonth in range(1, 7):
calendarStr += ' <tr>\n'
if dayOfMonth == daysInMonth:
continue
calendarStr += ' <tr>\n'
for dayNumber in range(1, 8):
if (weekOfMonth > 1 and dayOfMonth < daysInMonth) or \
(weekOfMonth == 1 and dayNumber >= dow):