import { TimePeriodKind } from '../../core/spreadsheet-model/index.js'; /** The UTC calendar fields an Excel serial decomposes into. */ export interface DateParts { readonly year: number; /** 1-indexed month (January = 1). */ readonly month: number; readonly day: number; /** Day of week, 0 = Sunday … 6 = Saturday (Excel WEEKDAY type 1 minus 1). */ readonly dow: number; } /** * Decompose an Excel serial into UTC calendar parts. A fractional serial is * floored to its day first (the calendar date is time-of-day independent). */ export declare function serialToParts(serial: number, date1904: boolean): DateParts; /** * A UTC Date's calendar day → integer Excel serial. Reads the Date's UTC date * parts (not its instant), so a caller passing `new Date('2026-06-17')` * (UTC midnight) maps to that day regardless of the host time zone. */ export declare function serialFromDate(d: Date, date1904: boolean): number; /** * `(year, month1, day)` → integer serial. Excel's `DATE` rolls out-of-range * months and days (`DATE(2024,13,1)` = 2025-01-01); `Date.UTC` already * normalises, so this inherits the same behaviour. */ export declare function serialFromYmd(year: number, month1: number, day: number, date1904: boolean): number; /** * §18.3.1.10 `timePeriod` — does a cell's date fall in the window relative to * `nowSerial` (the injected reference day)? Windows match Excel's built-in * rules: the week runs Sunday..Saturday; "last 7 days" is today and the previous * six. Both serials are floored to whole days before comparison. */ export declare function timePeriodMatches(period: TimePeriodKind, cellSerial: number, nowSerial: number, date1904: boolean): boolean;