Remove timedelta duration from the instance. :param delta: The timedelta instance
(self, delta: datetime.timedelta)
| 151 | return self.add(seconds=delta.seconds, microseconds=delta.microseconds) |
| 152 | |
| 153 | def subtract_timedelta(self, delta: datetime.timedelta) -> Time: |
| 154 | """ |
| 155 | Remove timedelta duration from the instance. |
| 156 | |
| 157 | :param delta: The timedelta instance |
| 158 | """ |
| 159 | if delta.days: |
| 160 | raise TypeError("Cannot subtract timedelta with days to Time.") |
| 161 | |
| 162 | return self.subtract(seconds=delta.seconds, microseconds=delta.microseconds) |
| 163 | |
| 164 | def __add__(self, other: datetime.timedelta) -> Time: |
| 165 | if not isinstance(other, timedelta): |