/** * Copyright Aquera Inc 2026 * * This source code is licensed under the BSD-3-Clause license found in the * LICENSE file in the root directory of this source tree. */ /** The editable wall-clock fields exposed by `nile-timestamp-builder`. */ export declare enum TimestampField { Year = "year", Month = "month", Day = "day", Hour = "hour", Minute = "minute", Second = "second", Millisecond = "millisecond" } export interface WallClock { year: number; month: number; day: number; hour: number; minute: number; second: number; millisecond: number; } export declare function hasTemporal(): boolean; /** Returns the list of supported IANA timezones using Intl or the bundled fallback list. */ export declare function getTimezoneList(): string[]; /** Resolves the runtime's local IANA timezone, falling back to `UTC`. */ export declare function getLocalTimeZone(): string; /** Returns true when `tz` is a timezone identifier the runtime can format. */ export declare function isValidTimeZone(tz: string): boolean; export declare function daysInMonth(year: number, month: number): number; /** Clamps `value` into `[min, max]`; `NaN` collapses to `min`. */ export declare function clampField(value: number, min: number, max: number): number; export declare function clampWallClock(w: WallClock, minYear: number, maxYear: number): WallClock; /** Formats a wall-clock as `YYYY-MM-DD HH:mm:ss.SSS` with zero padding. */ export declare function formatWallClock(w: WallClock): string; /** Converts an epoch (ms) into the wall-clock fields observed in `tz`. Uses Temporal when present, otherwise an `Intl.DateTimeFormat` fallback. */ export declare function epochToFields(epochMs: number, tz: string): WallClock; /** Neutral wall-clock placeholder: the Unix epoch (`1970-01-01T00:00:00.000`) read in UTC.*/ export declare const EPOCH_WALLCLOCK: WallClock; /** Returns the timezone offset (ms) */ export declare function getTimeZoneOffsetMs(epochMs: number, tz: string): number; export declare function parseZonedValue(input: string): { date: Date; timezone: string; } | null; /** Normalizes supported `value` inputs into epoch milliseconds, or `null` if invalid. */ export declare function normalizeValueInput(input: Date | number | string | null | undefined): Date | null; /** Serializes a wall-clock into a zone-encoded string preserving its offset and IANA timezone. */ export declare function formatZonedValue(w: WallClock, tz: string): string; /** Converts wall-clock fields in `tz` to epoch milliseconds. */ export declare function fieldsToEpoch(w: WallClock, tz: string): number;