- self.context['year'] = year
- self.context['month'] = month
- self.context['day'] = 1
+ tmp_date = datetime.date(year=year, month=month, day=1)
+ tmp_date = tmp_date - datetime.timedelta(days=1)
+
+ self.context['year'] = tmp_date.year
+ self.context['month'] = tmp_date.month
+ self.context['day'] = tmp_date.day