export type WeekdayFormat='narrow'|'short'|'long';export type CalendarMode='single'|'range'; /** Normalize an untyped calendar count to the supported one- or two-month range. */ export declare function normalizeCalendarMonths(value:unknown):1|2; /** Normalize an untyped weekday format before passing it to `Intl.DateTimeFormat`. */ export declare function normalizeWeekdayFormat(value:unknown):WeekdayFormat; /** Normalize an untyped picker mode to the single-date default. */ export declare function normalizeCalendarMode(value:unknown):CalendarMode; /** * Construct a date formatter while treating a malformed runtime locale as * the platform default. Attribute values and JavaScript property writes are * not constrained by TypeScript's declarations, so they must not be allowed * to turn a calendar render into a `RangeError`. */ export declare function dateTimeFormat(locale:unknown,options:Intl.DateTimeFormatOptions):Intl.DateTimeFormat; /** Local proleptic-Gregorian date construction without Date's legacy 0–99 → 1900 remap. */ export declare function localDate(year:number,month?:number,day?:number):Date; /** UTC counterpart of {@link localDate}, used for calendar-day arithmetic across DST. */ export declare function utcDate(year:number,month?:number,day?:number):Date; /** Parse `YYYY-MM-DD` into a local Date, or null if invalid. */ export declare function parseISO(s:string):Date|null; /** Format a supported Date as local `YYYY-MM-DD`, or an empty string outside years 0000–9999. */ export declare function formatISO(d:Date):string;export declare function isSameDay(a:Date,b:Date):boolean; /** First day of the month `n` months from `d`. */ export declare function addMonths(d:Date,n:number):Date; /** * `d` shifted by `n` months, keeping the same day-of-month unless the target * month is shorter, in which case the day is clamped to that month's last * day. Plain `new Date(year, month + n, d.getDate())` construction instead * overflows a too-large day-of-month into the *following* month (e.g. Jan 31 * + 1 month rolls into March, skipping February entirely) because the Date * constructor normalizes out-of-range day components rather than clamping * them. */ export declare function addMonthsClampingDay(d:Date,n:number):Date;export declare function clampDate(d:Date,min:Date|null,max:Date|null):Date; /** * A 6×7 grid of Dates covering the given month, week-aligned to `firstDayOfWeek` * (0=Sunday … 6=Saturday). Includes leading/trailing days from adjacent months. */ export declare function monthMatrix(year:number,month:number,firstDayOfWeek?:number):Date[][]; /** Localized weekday header labels, ordered from `firstDayOfWeek`. */ export declare function weekdayLabels(firstDayOfWeek?:number,format?:WeekdayFormat,locale?:string):string[]; /** Localized "Month YYYY" title. */ export declare function monthTitle(year:number,month:number,locale?:string):string; /** * Resolve a `first-day-of-week` attribute (name or 'auto') to a 0–6 index. * `'auto'` derives the answer from `locale` via `Intl.Locale`'s week-info * when the runtime supports it, falling back to Sunday otherwise. */ export declare function resolveFirstDayOfWeek(value:string,locale?:string):number;