/** * Check if two dates are on the same day (ignoring time) */ export declare function isSameDay(a: Date, b: Date): boolean; /** * Calculate time elapsed since a given date and return a human-readable string * Examples: "5s", "10 min", "3h", "2d", "1w", "3mo", "2y" */ export declare function timeAgo(then: Date): string; /** * Format a timestamp for display * - If today: shows relative time (e.g., "5 min") * - If not today: shows formatted date (e.g., "Jan 15, 2026") * * The `timeZone` arg only affects the absolute-date rendering; the today/relative * boundary is computed in the host local day (a known cosmetic limitation near * midnight across zones). */ export declare function formatTimestamp(input: string | Date, timeZone?: string): string; /** * Format milliseconds to human-readable duration * Examples: "500 ms", "1 sec", "30 sec", "5 min", "1 hr", "2 days" */ export declare function formatDuration(ms: number): string; /** * Time frequency units for duration inputs * Value is the multiplier to convert to milliseconds */ export declare const frequencyUnits: readonly [{ readonly value: 1; readonly label: "Milliseconds"; }, { readonly value: 1000; readonly label: "Seconds"; }, { readonly value: 60000; readonly label: "Minutes"; }, { readonly value: 3600000; readonly label: "Hours"; }]; /** Browser IANA zone, e.g. "America/Toronto". Falls back to "UTC" if unavailable. */ export declare function detectTimeZone(): string; /** * Longitude -> nearest whole-hour offset -> an Etc/GMT±N id. Note POSIX sign inversion: * a positive (east) offset is Etc/GMT-N. This is a rough approximation: no DST, no * political borders. 0 -> "UTC". */ export declare function offsetZoneFromLongitude(longitude: number): string; /** * Default display zone. Prefers the browser's IANA zone: it is DST-correct and, for a user * in the sensor's region, already the right local zone. Only when detection is unavailable * (returns "UTC") does it fall back to a longitude-derived fixed offset, trying each * candidate longitude in order. Callers pass candidates in priority order: BIM sensors sit * in a building (building longitude first), map sensors carry their own coordinates (sensor * longitude first). */ export declare function resolveDefaultTimeZone(longitudeCandidates: Array): string; /** Format an epoch in a specific zone. Handles Etc/GMT±N and true IANA zones alike. */ export declare function formatInZone(epochMs: number, timeZone: string, opts?: Intl.DateTimeFormatOptions): string; //# sourceMappingURL=timeUtils.d.ts.map