Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading