/** * ROWS UNDER A DAY — the one implementation of "fold a set into its days", for * `Itinerary` and the calendar's `CalendarAgenda` alike. * * What is NOT here is the day's HEAD: the agenda's states no year because it * sits under a month title that does, and an itinerary's crosses months and * years, so the words each device heads a day with stay with the device. */ /** One day's rows, in the order they are drawn. */ export interface DayRun { /** The day's key — an ISO date, so the runs sort forward as text. */ day: string; rows: readonly T[]; } /** * The rows folded into their days, ascending, each day's rows in `order`. * * A row whose `day` is `null` belongs to no day and is dropped: the day head is * the device's subject. * * ASCENDING IS NOT AN OPTION. Ties inside a day break on ARRIVAL, so a caller's * order decides between two rows the comparator calls equal, and the sorts run * over copies: the caller's array is never touched. */ export declare function dayRuns(rows: readonly T[], day: (row: T) => string | null, order?: (a: T, b: T) => number): DayRun[]; /** A `Date`'s own day, as the key the runs are folded on. LOCAL, never * `toISOString` — that is UTC, and east of Greenwich every event before 07:00 * files under the day before. */ export declare function dayKey(date: Date): string; /** * EVERY DAY OF A WINDOW, ASCENDING AND INCLUSIVE — the run a register whose ROWS * ARE DAYS is drawn over. * * {@link dayRuns} folds the days a set HAS; this states the days a window has, * so a day nobody filed against is still drawn — the gap is what such a register * is read for. * * NOTHING where either end is not a date or the window is inverted. Walked at * NOON so a step across a daylight-saving boundary lands on the next day rather * than on 23:00 of the same one, and LOCAL for the reason {@link dayKey} is. */ export declare function calendarDays(from: string, to: string): string[];