def allDayForDate(self,this_date,timeZone=None):
if isinstance(this_date,datetime):<EOL><INDENT>d = this_date.date()<EOL><DEDENT>else:<EOL><INDENT>d = this_date<EOL><DEDENT>date_start = datetime(d.year,d.month,d.day)<EOL>naive_start = self.startTime if timezone.is_naive(self.startTime) else timezone.make_naive(self.startTime, timezone=timeZone)<EOL>naive_end = self.endTime if timezone.is_naive(self.endTime) else timezone.make_naive(self.endTime, timezone=timeZone)<EOL>return (<EOL>naive_start <= date_start and<EOL>naive_end >= date_start + timedelta(days=<NUM_LIT:1>,minutes=-<NUM_LIT:30>)<EOL>)<EOL>
This method determines whether the occurrence lasts the entirety of
a specified day in the specified time zone.  If no time zone is specified,
then it uses the default time zone).  Also, give a grace period of a few
minutes to account for issues with the way events are sometimes entered.