From 982e7b0ffb27eaeb42fd52137198c2d1fa8e406f Mon Sep 17 00:00:00 2001 From: Adolfo Reyna Date: Tue, 26 May 2026 22:10:34 -0400 Subject: [PATCH] Bound focused calendar event queries --- src/integrations/calendar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/integrations/calendar.js b/src/integrations/calendar.js index 2b11518..5e99d4e 100644 --- a/src/integrations/calendar.js +++ b/src/integrations/calendar.js @@ -31,9 +31,10 @@ function run(argv) { const calendarName = String(calendar.name()); if (input.calendarIndex !== null && c !== input.calendarIndex) continue; if (input.calendar && calendarName !== input.calendar) continue; + // Calendar's JXA bridge treats multi-property date tests inconsistently. + // Bound one indexed property here, then enforce overlap below. const events = calendar.events.whose({ - startDate: {_lessThanEquals: end}, - endDate: {_greaterThanEquals: start} + startDate: {_greaterThanEquals: start, _lessThanEquals: end} })(); for (let e = 0; e < events.length; e++) { const event = events[e];