+ def show_calendar(self, start_date_str, end_date_str):
+ # self.tag_filter_and = ['calendar']
+ # self.tag_filter_not = ['deleted']
+
+ # todays_date_obj = datetime.strptime(today_date(), DATE_FORMAT)
+ # yesterdays_date_obj = todays_date_obj - timedelta(1)
+ # def get_day_limit_obj(index, day_limit_string):
+ # date_obj = datetime.strptime(sorted(self.days.keys())[index], DATE_FORMAT)
+ # if day_limit_string and len(day_limit_string) > 0:
+ # if day_limit_string in {'today', 'yesterday'}:
+ # date_obj = todays_date_obj if day_limit_string == 'today' else yesterdays_date_obj
+ # else:
+ # date_obj = datetime.strptime(day_limit_string, DATE_FORMAT)
+ # return date_obj
+ # start_date_obj = get_day_limit_obj(0, start_date_str)
+ # end_date_obj = get_day_limit_obj(-1, end_date_str)
+
+ # days_to_show = {}
+ # for n in range(int((end_date_obj - start_date_obj).days) + 1):
+ # date_obj = start_date_obj + timedelta(n)
+ # date_str = date_obj.strftime(DATE_FORMAT)
+ # if date_str not in self.days.keys():
+ # days_to_show[date_str] = self.add_day(date_str)
+ # else:
+ # days_to_show[date_str] = self.days[date_str]
+ # days_to_show[date_str].month_title = date_obj.strftime('%B') if date_obj.day == 1 else None
+ # days_to_show[date_str].weekday = datetime.strptime(date_str, DATE_FORMAT).strftime('%A')[:2]
+
+ days_to_show = self.init_calendar_items(start_date_str, end_date_str)