def __sub__(self, other):
if isinstance(other, date):<EOL><INDENT>days1 = self.toordinal()<EOL>days2 = other.toordinal()<EOL>return timedelta._create(days1 - days2, <NUM_LIT:0>, <NUM_LIT:0>, False)<EOL><DEDENT>if isinstance(other, timedelta):<EOL><INDENT>return self._add_timedelta(other, -<NUM_LIT:1>)<EOL><DEDENT>return NotImplemented<EOL>
Subtract two dates, or a date and a timedelta.