/** * Timezone utilities using Intl API with fallbacks */ import type { ZonedTime } from './types.js'; /** Get offset (minutes) for a zone at a given date */ export declare function getTimezoneOffset(zone: string, date?: Date): number | null; /** Format date/time in a zone */ export declare function formatInTimeZone(date: Date, zone: string, options?: Intl.DateTimeFormatOptions): string; /** Get a lightweight ZonedTime object */ export declare function getZonedTime(date: Date, zone: string): ZonedTime | null; /** Convert a date (treated as absolute moment) to another zone's clock components */ export declare function convertDateToZone(date: Date, zone: string): { year: number; month: number; day: number; hour: number; minute: number; second: number; } | null; /** Check if provided zone string is a valid IANA zone */ export declare function isValidTimeZone(zone: string): boolean; /** List a subset of common timezones (cannot enumerate all via API) */ export declare const COMMON_TIMEZONES: string[]; /** Get current local offset in minutes */ export declare function getLocalOffset(): number; /** Compare two timezones offset at given date */ export declare function compareZoneOffsets(zoneA: string, zoneB: string, date?: Date): number | null; /** Shift a date by target zone offset difference relative to current local zone. * This does not change the absolute moment; instead returns a new Date representing * the same wall clock time in the target zone interpreted as local. * For example useful for naive scheduling. */ export declare function reinterpretAsZone(date: Date, targetZone: string): Date | null; /** * Check if a date is in Daylight Saving Time for a given timezone * Uses a yearly-offset heuristic: sample the zone's local year and treat the * maximum observed UTC offset as the DST offset for that year. * @param date - date to check * @param zone - IANA timezone string */ export declare function isDST(date: Date, zone: string): boolean | null; /** * Get the next DST transition (if any) for a timezone * @param date - starting date * @param zone - IANA timezone string * @returns next DST transition date or null if no DST in that zone */ export declare function getNextDSTTransition(date: Date, zone: string): Date | null; /** * Find overlapping working hours between multiple timezones * @param zones - array of IANA timezone strings * @param workHoursStart - work hours start (0-24) * @param workHoursEnd - work hours end (0-24) * @param date - reference date (default: today) * @returns one contiguous UTC overlap window, specifically the longest * contiguous overlap slice. A full-day overlap is returned as * `{ startUTC: 0, endUTC: 24 }`, and wrapped overlaps are returned with * `endUTC` normalized back into the 0-24 range and may be less than `startUTC` */ export declare function findCommonWorkingHours(zones: string[], workHoursStart?: number, workHoursEnd?: number, date?: Date): { startUTC: number; endUTC: number; } | null; /** * Get all timezone abbreviations for a zone on a given date * @param zone - IANA timezone string * @param date - reference date */ export declare function getTimezoneAbbreviation(zone: string, date?: Date): string | null; /** * Convert a wall clock time from one timezone to another * @param date - date with time in source timezone * @param fromZone - source timezone * @param toZone - target timezone */ export declare function convertBetweenZones(date: Date, fromZone: string, toZone: string): Date | null; /** * Get the time difference between two timezones in hours * @param zoneA - first timezone * @param zoneB - second timezone * @param date - reference date */ export declare function getTimezoneDifferenceHours(zoneA: string, zoneB: string, date?: Date): number | null; /** * Check if two timezones have the same offset at a given date * @param zoneA - first timezone * @param zoneB - second timezone * @param date - reference date */ export declare function isSameTimezone(zoneA: string, zoneB: string, date?: Date): boolean | null; //# sourceMappingURL=timezone.d.ts.map