/** * Wall-clock time in a named zone, without pulling in a date library. * * `find_free_time` has to answer "09:00 to 18:00, Europe/Madrid" as a set of * instants, and that mapping is not a fixed offset: it moves twice a year. Get * it wrong and every slot is silently shifted by an hour for half the year — * a failure that produces a perfectly plausible-looking answer, which is the * expensive kind. */ /** Rejects a zone name before it can quietly become UTC further down. */ export declare function assertValidTimeZone(timeZone: string): void; /** The zone this process is running in. The only defensible default. */ export declare function systemTimeZone(): string; /** * The instant at which the wall clock in `timeZone` reads the given date and time. * * Two passes, because the offset depends on the instant we are still solving * for: guess by treating the wall time as UTC, read the offset there, correct, * then read the offset again at the corrected instant and apply that one. The * second pass is what makes the days either side of a DST change come out right. * * The one hour that repeats when clocks go back is genuinely ambiguous; this * resolves it to the first occurrence. For "when am I free" that is the safe * side — it never invents availability. */ export declare function zonedTimeToInstant(year: number, month: number, day: number, hour: number, minute: number, timeZone: string): Date; /** The calendar date in `timeZone` at a given instant, as `[year, month, day]`. */ export declare function zonedDateParts(instant: Date, timeZone: string): [number, number, number]; /** Day of week for a calendar date: 0 = Sunday, 6 = Saturday. */ export declare function weekdayOf(year: number, month: number, day: number): number; /** Adds whole days to a calendar date without ever touching a time zone. */ export declare function addDays(year: number, month: number, day: number, days: number): [number, number, number]; /** Parses "HH:MM" into minutes past midnight. */ export declare function parseClockTime(value: string, label: string): { hour: number; minute: number; }; /** * An instant, or a refusal. * * A bare "2026-09-10T09:00:00" means nothing without a zone, and accepting it * would silently pick the server's. Google's own JSON has shipped fixed offsets * that were wrong for the season; the cure is to demand the offset and check it. */ export declare function parseInstant(value: string, label: string): Date; export interface Interval { start: number; end: number; } /** Merges overlapping and touching intervals into a minimal ordered set. */ export declare function mergeIntervals(intervals: Interval[]): Interval[]; /** * `window` minus every busy interval. * * A busy block that only partially overlaps still removes the part it covers — * which is the whole point: half a busy hour is not free. */ export declare function subtractIntervals(window: Interval, busy: Interval[]): Interval[]; export declare const MINUTE = 60000; //# sourceMappingURL=timezone.d.ts.map