Skip to content
Snippets Groups Projects
Commit 3c86810a authored by Nicolas Évrard's avatar Nicolas Évrard :space_invader:
Browse files

Ensure my_monthdatescalendar returns always 6 weeks

issue4
parent 56d56698
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,6 @@
def my_monthdatescalendar(cal, date):
# Months that have only five weeks are filled with another week from
# Months that have less than five weeks are filled with weeks from
# the following month.
weeks = cal.monthdatescalendar(date.year, date.month)
......@@ -18,6 +18,6 @@
# the following month.
weeks = cal.monthdatescalendar(date.year, date.month)
if len(weeks) < 6:
while len(weeks) < 6:
last_day = weeks[-1][-1]
offset = datetime.timedelta(1)
week = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment