import type { JsonValue } from '../../types.ts'; export declare const WINDOW_BACK_DAYS = 30; export declare const WINDOW_AHEAD_DAYS = 90; /** * Resolve an IANA zone name, falling back to UTC when unknown. * * A calendar can name a zone this platform's ICU data does not carry. * Failing the whole listing over it would let one bad calendar hide every * other one, so fall back and keep going. */ export declare function zone(tz: string): Intl.DateTimeFormat; /** The instant at which a local calendar day begins. */ export declare function localMidnight(day: string, tz: string): number; /** The `YYYY-MM-DD` a day-count offset lands on, in floating date space. */ export declare function shiftDay(day: string, days: number): string; /** The local date an instant falls on, `YYYY-MM-DD`. */ export declare function localDate(instant: number, tz: string): string; /** * The RFC3339 timeMin/timeMax pair covering one local day. * * Computed as consecutive local midnights rather than start + 24h: a local * day is 23 or 25 hours on the two DST transitions each year, and adding a * fixed day would drop or double an hour of events. */ export declare function dayBounds(day: string, tz: string): [string, string]; /** The RFC3339 pair for the default listing window around a day. */ export declare function windowBounds(today: string, tz: string): [string, string]; /** * Whether a string is a real calendar date, not merely date-shaped. * * `2026-02-30` matches the shape and is not a day; letting it through made * stat report a directory that every later call then failed on. */ export declare function validDay(day: string): boolean; /** Whether an event time slot is a floating all-day date. */ export declare function isAllDay(slot: Record): boolean; /** * Resolve one event time slot to an absolute instant. * * A dateTime with no offset is a zoned event, not an error: Google requires * an offset unless the slot names its own zone. Reading it in the host zone * would silently move the event. */ export declare function slotInstant(slot: Record, tz: string): number | null; /** * The absolute [start, end) span of an event. * * An all-day event's `end.date` is exclusive, so a one-day event is * `start=D, end=D+1` and its span closes at the midnight opening the next * day. That is the same convention the instant carries, so no adjustment is * applied here. */ export declare function eventSpan(event: Record, tz: string): [number, number] | null; /** * Every local day an event's span touches. * * The end is exclusive, so an event closing exactly at local midnight does * not reach into the following day; a zero-length event still occupies the * day it starts on. */ export declare function daysCovered(span: [number, number], tz: string): string[]; /** * The `HHMM-HHMM` label for an event as seen on one local day. * * Times are clamped to the day, so an event running through it reads * `0000-2400` rather than repeating times that belong to another day. * `2400` is how an end at the next local midnight is spelled, since `0000` * there would sort before the start. */ export declare function clampedHhmm(span: [number, number], day: string, tz: string): string; //# sourceMappingURL=day.d.ts.map