From 4742338bd42a667ce4b6a8a72fa159ab9192c0e7 Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Sun, 16 Nov 2025 15:06:22 -0500 Subject: [PATCH] fix(bounds): don't use start of day --- src/calendar.mjs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/calendar.mjs b/src/calendar.mjs index c1282ec..7e4f59a 100644 --- a/src/calendar.mjs +++ b/src/calendar.mjs @@ -14,9 +14,7 @@ export const getEventsFromCalendar = async url => { /** * @param {Date} start */ -export const getWeekBounds = (start = new Date()) => { - start.setUTCHours(0, 0, 0, 0); - +export const getNextWeek = (start = new Date()) => { const end = new Date(start); end.setUTCDate(start.getUTCDate() + 7); @@ -30,7 +28,7 @@ export const getWeekBounds = (start = new Date()) => { * @returns {Promise} The date of the next meeting, or null if no meeting is found */ export const findNextMeetingDate = async (allEvents, { properties }) => { - const [weekStart, weekEnd] = getWeekBounds(); + const [weekStart, weekEnd] = getNextWeek(); const filteredEvents = allEvents.filter( event =>