import * as Either from "effect/Either"; /** * an interval is the time frame between two Temporal.ZonedDateTimes, including the start and excluding the end. */ export type Interval = { readonly start: Temporal.ZonedDateTime; readonly end: Temporal.ZonedDateTime; }; /** * whether `date` is inside `interval`. "inside" means that the start can be * equal to date while the end has to be strictly after the `date`. This is an * opinionated approach because often the end of an interval coincides with the * start of the next one, e.g. the current day ends when the next one start, and * not one picosecond sooner. */ export declare const contains: (interval: Interval, date: Temporal.ZonedDateTime) => boolean; /** * whether a completely covers b */ export declare const covers: (a: Interval, b: Interval) => boolean; /** * calculates the intesection between two intervals. If the intervals have no * overlap undefined is returned. */ export declare const intersection: (a: Interval, b: Interval) => Interval | undefined; /** * get the duration of an interval */ export declare const durationOf: ({ start, end }: Interval) => Temporal.Duration; /** * whether a overlaps b */ export declare const overlaps: (a: Interval, b: Interval) => boolean; export declare const fromDuration: (duration: Temporal.DurationLike, start: Temporal.ZonedDateTime) => Interval; export declare const stringify: (interval: Interval) => string; export declare const parse: (string: string) => Either.Either; export declare const equals: (a: Interval, b: Interval) => boolean;