From cfff2ad72b2a66ee57fc148b1999c49e2cf6ef38 Mon Sep 17 00:00:00 2001 From: Julian Dinter Date: Wed, 25 Aug 2021 17:28:37 +0200 Subject: [PATCH] Changed comment regarding "ical.js" and "node-ical". --- modules/default/calendar/calendarutils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/default/calendar/calendarutils.js b/modules/default/calendar/calendarutils.js index 9d9876e1..91679f13 100644 --- a/modules/default/calendar/calendarutils.js +++ b/modules/default/calendar/calendarutils.js @@ -307,10 +307,10 @@ const CalendarUtils = { // Loop through the set of date entries to see which recurrences should be added to our event list. for (let d in dates) { let date = dates[d]; - // FIXME: We now use node-ical instead of ical.js, but method stays the same. - // ical.js started returning recurrences and exdates as ISOStrings without time information. - // .toISOString().substring(0,10) is the method they use to calculate keys, so we'll do the same - // (see https://github.com/peterbraden/ical.js/pull/84 ) + // Remove the time information of each date by using its substring, using the following method: + // .toISOString().substring(0,10). + // since the date is given as ISOString with YYYY-MM-DDTHH:MM:SS.SSSZ + // (see https://momentjs.com/docs/#/displaying/as-iso-string/). const dateKey = date.toISOString().substring(0, 10); let curEvent = event; let showRecurrence = true;