Files
twenty/packages/twenty-front/src/modules/activities/calendar/utils/hasCalendarEventEnded.ts
T
Félix Malfait 464a480043 Continue ESLINT9 Migration (#13795)
Might already fix #13793
2025-08-10 23:25:58 +02:00

9 lines
379 B
TypeScript

import { isPast } from 'date-fns';
import { type CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
import { getCalendarEventEndDate } from '@/activities/calendar/utils/getCalendarEventEndDate';
export const hasCalendarEventEnded = (
calendarEvent: Pick<CalendarEvent, 'endsAt' | 'isFullDay' | 'startsAt'>,
) => isPast(getCalendarEventEndDate(calendarEvent));