From 556b89443166fbde042e8e8d7db8417ee2fe516f Mon Sep 17 00:00:00 2001 From: "fefe.clochette" Date: Tue, 9 Dec 2025 13:34:38 +0100 Subject: [PATCH] Auto-commit for deploy to production - 2025-12-09 13:34:38 --- assets/js/family-calendar.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/js/family-calendar.js b/assets/js/family-calendar.js index 56e514d..7d37084 100644 --- a/assets/js/family-calendar.js +++ b/assets/js/family-calendar.js @@ -212,20 +212,18 @@ function addSchoolHolidayEventsFromRecords(records, events) { groups.forEach((g) => { const start = new Date(g.startIso); const end = new Date(g.endIso); - let current = new Date(start); - while (current <= end) { + // end = date de reprise -> on s'arrĂȘte la veille + while (current < end) { const year = current.getFullYear(); const month = String(current.getMonth() + 1).padStart(2, "0"); const day = String(current.getDate()).padStart(2, "0"); const isoDate = `${year}-${month}-${day}`; - events.push({ date: isoDate, type: "VACANCES_SCOLAIRES", duration: 1, }); - current.setDate(current.getDate() + 1); } });