Remove timedelta duration from the instance. :param delta: The timedelta instance
(self, delta: timedelta)
| 235 | return self.add(days=delta.days) |
| 236 | |
| 237 | def _subtract_timedelta(self, delta: timedelta) -> Self: |
| 238 | """ |
| 239 | Remove timedelta duration from the instance. |
| 240 | |
| 241 | :param delta: The timedelta instance |
| 242 | """ |
| 243 | if isinstance(delta, pendulum.Duration): |
| 244 | return self.subtract( |
| 245 | years=delta.years, |
| 246 | months=delta.months, |
| 247 | weeks=delta.weeks, |
| 248 | days=delta.remaining_days, |
| 249 | ) |
| 250 | |
| 251 | return self.subtract(days=delta.days) |
| 252 | |
| 253 | def __add__(self, other: timedelta) -> Self: |
| 254 | if not isinstance(other, timedelta): |