(self, time)
| 130 | d = datetime.__add__(self, time) |
| 131 | return date(d.year, d.month, d.day, d.hour, d.minute, d.second, d.microsecond, self.format) |
| 132 | def __sub__(self, time): |
| 133 | d = datetime.__sub__(self, time) |
| 134 | if isinstance(d, timedelta): |
| 135 | # Subtracting two dates returns a time(). |
| 136 | return d |
| 137 | return date(d.year, d.month, d.day, d.hour, d.minute, d.second, d.microsecond, self.format) |
| 138 | |
| 139 | def date(*args, **kwargs): |
| 140 | """ Returns a Date from the given parameters: |