Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jkriegshauser committed Oct 31, 2023
1 parent 2a6e2aa commit 0b3ff8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ _This release is scheduled to be released on 2024-01-01._
- Fix newsfeed module for feeds using "a10:updated" tag (#3238)
- Fix issue template (#3167)
- Fix for failing unit test (#3254)
- Fix calendar events sometimes not respecting deleted events (#3250)

## [2.25.0] - 2023-10-01

Expand Down
12 changes: 7 additions & 5 deletions modules/default/calendar/calendarfetcherutils.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,6 @@ const CalendarFetcherUtils = {
// 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];
// 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;

Expand Down Expand Up @@ -402,6 +397,13 @@ const CalendarFetcherUtils = {

let adjustDays = CalendarFetcherUtils.calculateTimezoneAdjustment(event, date);

// 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/).
// This must be done after `date` is adjusted
const dateKey = date.toISOString().substring(0, 10);

// For each date that we're checking, it's possible that there is a recurrence override for that one day.
if (curEvent.recurrences !== undefined && curEvent.recurrences[dateKey] !== undefined) {
// We found an override, so for this recurrence, use a potentially different title, start date, and duration.
Expand Down

0 comments on commit 0b3ff8c

Please sign in to comment.