Skip to content

Commit

Permalink
Fix calculating yearly chores with due date
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcclure committed Apr 16, 2023
1 parent 8358c7d commit ca1a107
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/chore_helper/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,8 @@ def _find_candidate_date(self, day1: date) -> date | None:
conf_date = self._date
if conf_date is None:
conf_date = start_date
else:
conf_date = datetime.strptime(conf_date, "%m/%d")
candidate_date = date(day1.year, conf_date.month, conf_date.day)
if candidate_date < day1:
candidate_date = date(day1.year + 1, conf_date.month, conf_date.day)
Expand Down

0 comments on commit ca1a107

Please sign in to comment.