import { differenceInDays } from "date-fns";
export const isVisible = ({ horizontalPosition }) => {
    return horizontalPosition <= 96 && horizontalPosition >= 0;
};
export const getFirstDate = (periods) => {
    return periods.sort((a, b) => a.start.getTime() - b.start.getTime())[0].start;
};
export const getLastDate = (periods) => {
    return periods.sort((a, b) => a.end.getTime() - b.end.getTime())[periods.length - 1].end;
};
export const withinADay = (date1, date2) => differenceInDays(date1, date2) <= 1;
export const invisiblePeriods = ({ horizontalPosition, width, }) => horizontalPosition >= 0 && horizontalPosition <= 100 && width > 0;
//# sourceMappingURL=filter.js.map