| 299 | return self.in_words() |
| 300 | |
| 301 | def __repr__(self) -> str: |
| 302 | rep = f"{self.__class__.__name__}(" |
| 303 | |
| 304 | if self._years: |
| 305 | rep += f"years={self._years}, " |
| 306 | |
| 307 | if self._months: |
| 308 | rep += f"months={self._months}, " |
| 309 | |
| 310 | if self._weeks: |
| 311 | rep += f"weeks={self._weeks}, " |
| 312 | |
| 313 | if self._days: |
| 314 | rep += f"days={self._remaining_days}, " |
| 315 | |
| 316 | if self.hours: |
| 317 | rep += f"hours={self.hours}, " |
| 318 | |
| 319 | if self.minutes: |
| 320 | rep += f"minutes={self.minutes}, " |
| 321 | |
| 322 | if self.remaining_seconds: |
| 323 | rep += f"seconds={self.remaining_seconds}, " |
| 324 | |
| 325 | if self.microseconds: |
| 326 | rep += f"microseconds={self.microseconds}, " |
| 327 | |
| 328 | rep += ")" |
| 329 | |
| 330 | return rep.replace(", )", ")") |
| 331 | |
| 332 | def __add__(self, other: timedelta) -> Self: |
| 333 | if isinstance(other, timedelta): |