export type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6; export declare function startOfDay(d: Date): Date; export declare function endOfDay(d: Date): Date; export declare function isSameDay(a: Date | null | undefined, b: Date | null | undefined): boolean; export declare function isSameMonth(a: Date, b: Date): boolean; export declare function isSameYear(a: Date, b: Date): boolean; export declare function startOfMonth(d: Date): Date; export declare function startOfYear(d: Date): Date; export declare function startOfDecade(d: Date): Date; export declare function addMonths(d: Date, n: number): Date; /** Move by whole months keeping the day of month (clamped to the target month's length). */ export declare function shiftMonthsKeepDay(d: Date, n: number): Date; export declare function addDays(d: Date, n: number): Date; export declare function addYears(d: Date, n: number): Date; export declare function withTime(d: Date, h: number, m: number, s?: number): Date; export declare function clamp(d: Date, min?: Date | null, max?: Date | null): Date; /** 6×7 grid (42 cells) starting on `weekStartsOn`. */ export declare function buildMonthGrid(viewDate: Date, weekStartsOn: WeekDay): Date[]; export declare function weekdayLabels(locale: string, weekStartsOn: WeekDay): string[]; export declare function monthLabels(locale: string, style?: 'short' | 'long'): string[]; export declare function formatMonthYear(d: Date, locale: string): string; export declare function formatYearOnly(d: Date, locale: string): string; export declare function formatMonthOnly(d: Date, locale: string): string; export declare function formatMedium(d: Date, locale: string): string; export declare function formatTime(d: Date, locale: string, hour12: boolean, showSeconds: boolean): string; export declare function formatDateTime(d: Date, locale: string, hour12: boolean, showSeconds: boolean): string; export declare function parseDate(input: Date | string | null | undefined): Date | null; export declare function isBefore(a: Date, b: Date): boolean; export declare function isAfter(a: Date, b: Date): boolean; export declare function pad2(n: number): string;