Number of days in month added

This commit is contained in:
Vitali Samurov 2020-08-17 22:58:01 +03:00
parent ef07e51371
commit 3f727ecf08

View File

@ -82,8 +82,9 @@ class Calendar(inkycal_module):
# Create grid and calculate icon sizes
now = arrow.now(tz = self.timezone)
monthstart = now.span('month')[0].weekday()
monthdays = now.ceil('month').day
if (monthstart > 4):
if monthstart > 4 and monthdays == 31:
calendar_rows, calendar_cols = 7, 7
else:
calendar_rows, calendar_cols = 6, 7