Fix calculation of start date in ContributionCalendar to correctly reflect the 52-week period
This commit is contained in:
@@ -10,7 +10,7 @@ function getCalendarDays() {
|
||||
|
||||
// Find the Monday that starts our 52-week period
|
||||
const startDate = new Date(todayUTC);
|
||||
startDate.setUTCDate(todayUTC.getUTCDate() - (52 * 7 - 1));
|
||||
startDate.setUTCDate(todayUTC.getUTCDate() - (51 * 7 - 1));
|
||||
|
||||
// Adjust startDate to the Monday of that week (using UTC day)
|
||||
const startDayOfWeek = startDate.getUTCDay(); // 0 = Sunday, 1 = Monday, etc.
|
||||
|
Reference in New Issue
Block a user