Remove duration from the instance.
(
self,
years: int = 0,
months: int = 0,
weeks: int = 0,
days: int = 0,
hours: int = 0,
minutes: int = 0,
seconds: float = 0,
microseconds: int = 0,
)
| 640 | ) |
| 641 | |
| 642 | def subtract( |
| 643 | self, |
| 644 | years: int = 0, |
| 645 | months: int = 0, |
| 646 | weeks: int = 0, |
| 647 | days: int = 0, |
| 648 | hours: int = 0, |
| 649 | minutes: int = 0, |
| 650 | seconds: float = 0, |
| 651 | microseconds: int = 0, |
| 652 | ) -> Self: |
| 653 | """ |
| 654 | Remove duration from the instance. |
| 655 | """ |
| 656 | return self.add( |
| 657 | years=-years, |
| 658 | months=-months, |
| 659 | weeks=-weeks, |
| 660 | days=-days, |
| 661 | hours=-hours, |
| 662 | minutes=-minutes, |
| 663 | seconds=-seconds, |
| 664 | microseconds=-microseconds, |
| 665 | ) |
| 666 | |
| 667 | # Adding a final underscore to the method name |
| 668 | # to avoid errors for PyPy which already defines |
no test coverage detected