/** * Utility functions for timezone-aware time formatting * Uses Luxon for timezone support with native Intl API */ /** * Format an ISO 8601 datetime string in the specified timezone * @param isoString - ISO 8601 datetime string (e.g., "2025-11-07T14:30:00+00:00") * @param timezone - IANA timezone identifier (e.g., "America/New_York", "Asia/Tokyo") * @param format - Optional format style ('full', 'long', 'medium', 'short') * @returns Formatted datetime string in local timezone */ export declare function formatInTimezone(isoString: string, timezone: string, format?: 'full' | 'long' | 'medium' | 'short', timeFormat?: '12h' | '24h'): string; /** * Format a date-only ISO string in the specified timezone * @param isoString - ISO 8601 datetime string * @param timezone - IANA timezone identifier * @returns Formatted date string (e.g., "Nov 7, 2025") */ export declare function formatDateInTimezone(isoString: string, timezone: string): string; /** * Format a time-only ISO string in the specified timezone * @param isoString - ISO 8601 datetime string * @param timezone - IANA timezone identifier * @returns Formatted time string (e.g., "2:30 PM EST") */ export declare function formatTimeInTimezone(isoString: string, timezone: string): string; /** * Get timezone abbreviation from IANA timezone identifier * @param timezone - IANA timezone identifier (e.g., "America/New_York") * @param datetime - Optional datetime to determine DST status * @returns Timezone abbreviation (e.g., "EST" or "EDT") */ export declare function getTimezoneAbbreviation(timezone: string, datetime?: Date): string; /** * Detect the IANA timezone for a coordinate. * * Uses `tz-lookup` for accurate global coordinate→timezone resolution (handles * international locations, US territories, and no-DST zones like Arizona). Falls * back to a coarse US longitude heuristic and finally UTC if the lookup fails * (e.g. invalid coordinates). * * @param latitude - Latitude * @param longitude - Longitude * @returns IANA timezone identifier */ export declare function guessTimezoneFromCoords(latitude: number, longitude: number): string; /** * Format a time range with timezone context * @param startTime - Start time ISO string * @param endTime - End time ISO string * @param timezone - IANA timezone identifier * @returns Formatted range (e.g., "Nov 7, 2:00 PM - 5:00 PM EST") */ export declare function formatTimeRangeInTimezone(startTime: string, endTime: string, timezone: string): string; /** * Format an observation age (in minutes) as a human-readable "N ago" string. * * Bands: 'just now' at 0, whole minutes under an hour, one-decimal hours * under 48 h, and whole days beyond that. The first three bands match the * expression this replaced verbatim (METAR's picker rejects anything over * 6 h, so the days band is unreachable from that call site). * * @param ageMinutes - Observation age in minutes (non-negative) * @returns Human-readable age string (e.g., "just now", "5 minutes ago", "2.5 hours ago", "3 days ago") */ export declare function formatObservationAge(ageMinutes: number): string; /** * Check if a timezone is valid IANA timezone identifier * @param timezone - Timezone string to validate * @returns true if valid, false otherwise */ export declare function isValidTimezone(timezone: string): boolean; //# sourceMappingURL=timezone.d.ts.map