def relative_to(self, day, full=False):
        if self.start > day or self.end < day:
            raise ValueError('Day out of range: {}'
                             .format(dict(day=day, start=self.start,
                                          end=self.end)))
        elif self.start < day and self.end > day:
            # event starts before and goes on longer than `day`:
            rangestr = self.symbol_strings['range']
        elif self.start < day:
            # event started before `day`
            rangestr = self.symbol_strings['range_end']
        elif self.end > day:
            # event goes on longer than `day`
            rangestr = self.symbol_strings['range_start']
        elif self.start == self.end == day:
            # only on `day`
            rangestr = ''

        body = self.summary
        if full:
            if self.description.strip() != '':
                body += ', ' + self.description.strip()
            if self.location.strip() != '':
                body += ', ' + self.location.strip()

        return ' '.join(filter(bool, (rangestr, body, self._recur_str)))
dataset/ETHPy150Open pimutils/khal/khal/khalendar/event.py/AllDayEvent.relative_to/original