/** Excel epoch identifier. */ export type ExcelEpoch = 'windows' | 'mac'; /** 1899-12-30 (UTC) — the Windows / 1900-system epoch in ms. */ export declare const WINDOWS_EPOCH_MS: number; /** 1904-01-01 (UTC) — the Mac / 1904-system epoch in ms. */ export declare const MAC_EPOCH_MS: number; /** * Convert an Excel serial date into a JS `Date` (UTC). The fractional part is * treated as a fraction of a day. For Windows 1900 the leap-bug compensation * kicks in for serials in [0, 60). */ export declare function excelToDate(serial: number, opts?: { epoch?: ExcelEpoch; }): Date; /** * Convert a JS `Date` into an Excel serial. The Date is read in UTC. On Windows * 1900, dates ≤ 1900-02-28 get a -1 day correction to account for Excel's * phantom leap day. */ export declare function dateToExcel(date: Date, opts?: { epoch?: ExcelEpoch; }): number; /** Excel duration serial (fraction of a day) → milliseconds. */ export declare function excelToDuration(serial: number): number; /** Milliseconds → Excel duration serial (fraction of a day). */ export declare function durationToExcel(ms: number): number; /** * Parse an ISO-8601 / W3CDTF datetime string into a `Date`. Same grammar as * `new Date(string)`; the wrapper just adds typed error reporting and a * stricter "must be a recognised ISO" guard. */ export declare function fromIso8601(s: string): Date; /** * Format a `Date` as ISO-8601 with second precision in UTC. Trims the * millisecond fragment that `Date.toISOString()` always produces, so the output * matches Excel / openpyxl's W3CDTF style. */ export declare function toIso8601(d: Date): string;