(self, other: Self)
| 447 | return mod_month == 0 and date.day == self._get_offset_day(date) |
| 448 | |
| 449 | def __sub__(self, other: Self) -> Self: |
| 450 | if TYPE_CHECKING: |
| 451 | import cftime |
| 452 | else: |
| 453 | cftime = attempt_import("cftime") |
| 454 | |
| 455 | if isinstance(other, cftime.datetime): |
| 456 | raise TypeError("Cannot subtract cftime.datetime from offset.") |
| 457 | if type(other) is type(self) and other.month == self.month: |
| 458 | return type(self)(self.n - other.n, month=self.month) |
| 459 | return NotImplemented |
| 460 | |
| 461 | def __mul__(self, other): |
| 462 | if isinstance(other, float): |
nothing calls this directly
no test coverage detected