Skip to content

Merge duplicate weeks spanning across two years (week 53 and week 01) #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lbeauvisage
Copy link

This PR is a follow-up to #86, which addressed the formatting issue when week intervals span two years.

Problem

Even with correct week-year formatting, MySQL may return two distinct keys for the same ISO week: for instance, both "2024-53" and "2025-01" can refer to the same 7-day period starting on Monday, December 30, 2024 and ending on Sunday, January 5, 2025.

This leads to:
• Two TrendValue items for the same week, which is incorrect.
• Duplicate data in visual representations, especially line charts, which expect unique and continuous labels on the X-axis.

Fix

This PR merges the two values into a single entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant