diff --git a/uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py b/uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py index 916520a532..3933a09551 100644 --- a/uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py +++ b/uk_bin_collection/uk_bin_collection/councils/AdurAndWorthingCouncils.py @@ -69,8 +69,10 @@ def parse_data(self, page: str, **kwargs) -> dict: current_year = datetime.now().year bin_date = bin_date.replace(year=current_year) - # If the date is in the past, it's probably for next year - if bin_date < datetime.now(): + # Only add a year if the date is more than 30 days in the past + # This handles both mid-year and year-end transitions better + today = datetime.now() + if (today - bin_date).days > 30: bin_date = bin_date.replace(year=current_year + 1) collections.append((bin_type, bin_date))