import { TimezoneFields } from '../types/scheduler-types'; /** * Timezone utility class for handling IANA timezone conversions and offsets. * All methods are static and work with UTC dates. */ export declare class Timezone { /** * Common IANA timezone identifiers for the timezone selector. */ static readonly timezoneData: TimezoneFields[]; /** * Get the UTC offset in minutes for a given date and timezone. * Accounts for DST active at that specific date. * * @param {Date} date - The date to calculate offset for (assumed UTC) * @param {string} timezone - IANA timezone name (e.g., 'America/New_York') * @returns {number} Offset in minutes from UTC (negative for west of UTC, positive for east) */ static offset(date: Date, timezone: string): number; /** * Convert a UTC date to the display wall-clock time in a target timezone. * Adds the timezone offset to shift UTC to local time in the target zone. * * @param {Date} date - UTC date to convert * @param {string} timezone - Target IANA timezone name * @returns {Date} A Date representing the wall-clock time in the target timezone */ static add(date: Date, timezone: string): Date; /** * Remove the timezone offset from a wall-clock date, returning UTC equivalent. * Interprets the input date as a local wall-clock in the given timezone * and converts it to the equivalent UTC instant. * * @param {Date} date - Wall-clock date in the source timezone (as a Date object) * @param {string} timezone - Source IANA timezone name * @returns {Date} UTC date equivalent */ static remove(date: Date, timezone: string): Date; /** * Remove the local runtime offset from a date. * Useful when Date objects are created in local time and need normalization to UTC. * * @param {Date} date - Date in local runtime timezone * @returns {Date} UTC-equivalent date with local offset removed */ static removeLocalOffset(date: Date): Date; /** * Convert a wall-clock time from one timezone/offset to another. * Takes a date interpreted in the source timezone and converts it to target timezone. * * @param {Date} date - Wall-clock date (assumed to be in source timezone) * @param {number|string} fromOffsetOrZone - Source timezone: numeric offset (minutes) or IANA name * @param {number|string} toOffsetOrZone - Target timezone: numeric offset (minutes) or IANA name * @returns {Date} Wall-clock date in target timezone */ static convert(date: Date, fromOffsetOrZone: number | string, toOffsetOrZone: number | string): Date; /** * Get a list of common IANA timezone identifiers for use in editor/UI selectors. * * @returns {TimezoneFields[]} Array of IANA timezone names sorted alphabetically */ static getLocalTimezoneName(): string; static getTimezoneData(): TimezoneFields[]; }