Changed comment regarding "ical.js" and "node-ical".

This commit is contained in:
Julian Dinter
2021-08-25 17:28:37 +02:00
parent b34bb87d7a
commit cfff2ad72b

View File

@@ -307,10 +307,10 @@ const CalendarUtils = {
// Loop through the set of date entries to see which recurrences should be added to our event list. // Loop through the set of date entries to see which recurrences should be added to our event list.
for (let d in dates) { for (let d in dates) {
let date = dates[d]; let date = dates[d];
// FIXME: We now use node-ical instead of ical.js, but method stays the same. // Remove the time information of each date by using its substring, using the following method:
// ical.js started returning recurrences and exdates as ISOStrings without time information. // .toISOString().substring(0,10).
// .toISOString().substring(0,10) is the method they use to calculate keys, so we'll do the same // since the date is given as ISOString with YYYY-MM-DDTHH:MM:SS.SSSZ
// (see https://github.com/peterbraden/ical.js/pull/84 ) // (see https://momentjs.com/docs/#/displaying/as-iso-string/).
const dateKey = date.toISOString().substring(0, 10); const dateKey = date.toISOString().substring(0, 10);
let curEvent = event; let curEvent = event;
let showRecurrence = true; let showRecurrence = true;