def formatday(<EOL>self, day, weekday,<EOL>day_template='<STR_LIT>',<EOL>noday_template='<STR_LIT>',<EOL>popover_template='<STR_LIT>',<EOL>):
super(EventCalendar, self).formatday(day, weekday)<EOL>now = get_now()<EOL>context = self.get_context()<EOL>context['<STR_LIT>'] = []<EOL>context['<STR_LIT>'] = day<EOL>context['<STR_LIT>'] = self.get_day_url(day)<EOL>context['<STR_LIT>'] = date(self.yr, self.mo, <NUM_LIT:1>)<EOL>context['<STR_LIT>'] = weekday<EOL>context['<STR_LIT>'] = self.cssclasses[weekday]<EOL>context['<STR_LIT>'] = popover_template<EOL>context['<STR_LIT>'] = len(self.count.get(day, [])),<EOL>try:<EOL><INDENT>processed_date = date(self.yr, self.mo, day)<EOL><DEDENT>except ValueError:<EOL><INDENT>processed_date = None<EOL><DEDENT>context['<STR_LIT>'] = date(self.yr, self.mo, <NUM_LIT:1>)<EOL>if day == <NUM_LIT:0>:<EOL><INDENT>template = noday_template<EOL><DEDENT>else:<EOL><INDENT>template = day_template<EOL><DEDENT>if now.date() == processed_date:<EOL><INDENT>context['<STR_LIT>'] = True<EOL><DEDENT>if processed_date and (day in self.count):<EOL><INDENT>for item in self.count[day]:<EOL><INDENT>self.pk = item[<NUM_LIT:1>]<EOL>self.title = item[<NUM_LIT:0>]<EOL>for event in self.events:<EOL><INDENT>if event.pk == self.pk:<EOL><INDENT>event.check_if_cancelled(processed_date)<EOL>context['<STR_LIT>'].append(event)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return render_to_string(template, context)<EOL>
Return a day as a table cell.