Check if its the anniversary. Compares the date/month values of the two dates.
( # type: ignore[override]
self, dt: datetime.datetime | None = None
)
| 541 | return self.to_date_string() == dt.to_date_string() |
| 542 | |
| 543 | def is_anniversary( # type: ignore[override] |
| 544 | self, dt: datetime.datetime | None = None |
| 545 | ) -> bool: |
| 546 | """ |
| 547 | Check if its the anniversary. |
| 548 | Compares the date/month values of the two dates. |
| 549 | """ |
| 550 | if dt is None: |
| 551 | dt = self.now(self.tz) |
| 552 | |
| 553 | instance = self.instance(dt) |
| 554 | |
| 555 | return (self.month, self.day) == (instance.month, instance.day) |
| 556 | |
| 557 | # ADDITIONS AND SUBSTRACTIONS |
| 558 |