Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Feb 19, 2024
1 parent abb4e56 commit 960e16f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
40 changes: 0 additions & 40 deletions client/utils/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,45 +858,6 @@ function getFlattenedEventsByDate(events: Array<IEventItem>, startDate: moment.M
}


const getStartDate = (event: IEventItem) => (
event.dates?.all_day ? moment.utc(event.dates.start) : moment(event.dates?.start)
);

const getEndDate = (event: IEventItem) => (
(event.dates?.all_day || event.dates?.no_end_time) ? moment.utc(event.dates.end) : moment(event.dates?.end)
);

const isEventInRange = (
event: IEventItem,
eventStart: moment.Moment,
eventEnd: moment.Moment,
start: moment.Moment,
end?: moment.Moment,
) => {
let localStart = eventStart;
let localEnd = eventEnd;
let startUnit : moment.unitOfTime.StartOf = 'second';
let endUnit : moment.unitOfTime.StartOf = 'second';

if (event.dates?.all_day) {
// we have only dates in utc
localStart = moment(eventStart.format('YYYY-MM-DD'));
localEnd = moment(eventEnd.format('YYYY-MM-DD'));
startUnit = 'day';
endUnit = 'day';
}

if (event.dates?.no_end_time) {
// we have time for start, but only date for end
localStart = moment(eventStart);
localEnd = moment(eventEnd.format('YYYY-MM-DD'));
endUnit = 'day';
}

return localEnd.isSameOrAfter(start, endUnit) && (end == null || localStart.isSameOrBefore(end, startUnit));
};


const getStartDate = (event: IEventItem) => (
event.dates?.all_day ? moment.utc(event.dates.start) : moment(event.dates?.start)
);
Expand Down Expand Up @@ -1201,7 +1162,6 @@ function defaultEventValues(
if (defaultPlaceList) {
newEvent.place = defaultPlaceList;
}

return newEvent;
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/server/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r ./core-requirements.txt
-e ../../
-e ../../

0 comments on commit 960e16f

Please sign in to comment.