mirror of
https://github.com/tiennm99/ghstats.git
synced 2026-09-01 06:19:20 +00:00
GitHub's contributionCalendar is week-aligned, so a "last year" query on 2026-05-02 returns days back to ~2025-04-27. That extra partial month inflated aggregateByMonth to 14 buckets and the x-axis stride logic placed 04/26 and 05/26 next to each other (x=290 / x=312), overlapping. Trim to start-of-(last.Month - 1y) so the chart spans a clean 13 months ending at the current month. Heatmap path is untouched — it needs the full week-aligned series.