Remove duration from the instance. :param years: The number of years :param months: The number of months :param weeks: The number of weeks :param days: The number of days
(
self, years: int = 0, months: int = 0, weeks: int = 0, days: int = 0
)
| 206 | return self.__class__(dt.year, dt.month, dt.day) |
| 207 | |
| 208 | def subtract( |
| 209 | self, years: int = 0, months: int = 0, weeks: int = 0, days: int = 0 |
| 210 | ) -> Self: |
| 211 | """ |
| 212 | Remove duration from the instance. |
| 213 | |
| 214 | :param years: The number of years |
| 215 | :param months: The number of months |
| 216 | :param weeks: The number of weeks |
| 217 | :param days: The number of days |
| 218 | """ |
| 219 | return self.add(years=-years, months=-months, weeks=-weeks, days=-days) |
| 220 | |
| 221 | def _add_timedelta(self, delta: timedelta) -> Self: |
| 222 | """ |
no test coverage detected