import { CalendarDate } from './CalendarDate'; type CalendarDateRangeOptions = { /** If true, the start and end dates are swapped if the end is before the start. */ autoArrange?: boolean; }; type DateRangeExcludeOptions = { excludeStart?: boolean; excludeEnd?: boolean; }; export declare class CalendarDateRange { readonly start: CalendarDate; readonly end: CalendarDate; /** * Throws an Error if the end is before the start, unless `{ autoArrange: true }` is passed. */ constructor(start: CalendarDate, end: CalendarDate, options?: CalendarDateRangeOptions); equals(calendarDateRange: CalendarDateRange): boolean; toString(): string; toJSON(): string; /** * @param isoString pattern YYYY-MM-DD/YYYY-MM-DD */ static parse(isoString: string): CalendarDateRange; /** * Returns true if there is a gap between two neighbouring date ranges. * The date ranges are sorted by start date, and each one is compared only with the one before it. * A date range inside a longer one is still a neighbour, so a gap after it counts even if the * longer date range covers those days. The input array is not modified. */ static hasGaps(values: CalendarDateRange[], options?: DateRangeExcludeOptions): boolean; /** * Returns true if any two of the given date ranges overlap. * The date ranges are sorted by start date and each one is compared with the one before it, * which finds every overlap. Date ranges that cover no days because of excludeStart or * excludeEnd, e.g. a single-day range with excludeEnd, can't overlap and are ignored. * The input array is not modified. */ static hasOverlap(values: CalendarDateRange[], options?: DateRangeExcludeOptions): boolean; /** * Returns the total amount of days in included in this date range * including start and end day. */ getTotalDays(): number; /** * Returns the difference in days between the start and end date. * See documentation of CalendarDate.getDifferenceInDays for more information. */ getDifferenceInDays(): number; /** * Returns the difference in months as an integer, ignoring the day values. */ getDifferenceInMonths(): number; includes(calendarDate: CalendarDate, options?: DateRangeExcludeOptions): boolean; includes(calendarDateRange: CalendarDateRange, options?: DateRangeExcludeOptions): boolean; /** * Creates an iterator that yields each CalendarDate in the range from start to end (inclusive). */ iterateDatesInRange(options?: DateRangeExcludeOptions): IterableIterator; /** * Makes the range iterable, e.g. with for...of or the spread operator. * Yields each CalendarDate from start to end (inclusive), like iterateDatesInRange(). */ [Symbol.iterator](): IterableIterator; /** * Returns an array of all CalendarDate objects in the range. */ toDatesArrayInRange(options?: DateRangeExcludeOptions): CalendarDate[]; /** * Returns the first date and the number of dates in the range. Callers step forward exactly * count - 1 times, so ranges at CalendarDate.MIN_VALUE or MAX_VALUE never leave the valid years. */ private getDatesInRange; } export {};