import type { RecurrenceFrequency } from "../types"; export interface ZonedDateTimeParts { year: number; month: number; day: number; hour: number; minute: number; second: number; millisecond: number; } /** * Thrown when local wall-clock fields cannot be resolved in a timezone. * Common during spring-forward DST gaps. `resolvedInstant` is the post-gap instant * the iterative solver settled on. */ export declare class ZonedTimeResolutionError extends Error { readonly parts: ZonedDateTimeParts; readonly timeZone: string; readonly resolvedInstant: Date; constructor(parts: ZonedDateTimeParts, timeZone: string, resolvedInstant: Date); } /** * Throws when a timezone is not accepted by the runtime Intl implementation. */ export declare function assertValidTimeZone(timeZone: string): void; /** * Returns local wall-clock fields for an instant in the requested timezone. */ export declare function getZonedParts(date: Date, timeZone: string): ZonedDateTimeParts; /** * Converts local wall-clock fields in a timezone back to an instant. */ export declare function zonedPartsToDate(parts: ZonedDateTimeParts, timeZone: string): Date; /** * Converts a "YYYY-MM-DD" local calendar date to the instant representing * midnight local time in the given timezone. */ export declare function localDateToZonedMidnight(date: string, timeZone: string): Date; /** * Advances local wall-clock fields by one RRULE interval. */ export declare function advanceZonedParts(parts: ZonedDateTimeParts, frequency: RecurrenceFrequency, interval: number): ZonedDateTimeParts; /** * Advances local monthly/yearly fields, or returns null when the target calendar * period has no matching day-of-month instead of allowing UTC overflow rollover. */ export declare function advanceZonedMonthlyOrYearlyPartsOrNull(parts: ZonedDateTimeParts, frequency: "MONTHLY" | "YEARLY", interval: number): ZonedDateTimeParts | null; /** * Adds local calendar days while preserving time fields. */ export declare function addZonedDays(parts: ZonedDateTimeParts, days: number): ZonedDateTimeParts; /** * Returns the weekday for local calendar fields using 0=Sunday. */ export declare function getZonedWeekday(parts: Pick): number; /** * Copies time fields from one local date onto another. */ export declare function applyZonedTime(day: Pick, timeSource: ZonedDateTimeParts): ZonedDateTimeParts;