import type { CalendarViewMode, Weekday } from "./types"; /** * Self-contained date helpers (native `Date` + `Intl`) — no date library, so the * calendar primitive adds no peer dependency to apps. All math is local-time, as * a calendar displays; we never cross into UTC arithmetic. */ export declare const MS_PER_DAY = 86400000; export declare function startOfDay(d: Date): Date; export declare function addDays(d: Date, n: number): Date; export declare function startOfWeek(d: Date, weekStartsOn?: Weekday): Date; export declare function startOfMonth(d: Date): Date; export declare function endOfMonth(d: Date): Date; export declare function addMonths(d: Date, n: number): Date; export declare function isSameDay(a: Date, b: Date): boolean; export declare function isToday(d: Date, now?: Date): boolean; export declare function isSameMonth(a: Date, b: Date): boolean; /** Whole calendar days from `a`'s day to `b`'s day (b - a), DST-safe. */ export declare function dayDiff(a: Date, b: Date): number; export declare function minutesSinceMidnight(d: Date): number; /** * How many week rows this month actually needs (4–6). A hardcoded 42 days buys a * stable grid height at the price of a whole empty row in most months; a month grid * is as tall as the month is, and the row height absorbs the difference. */ export declare function weekRowsInMonth(date: Date, weekStartsOn?: Weekday): number; /** The day columns a view spans: 7 for week, 1 for day, whole weeks for month/agenda. */ export declare function daysInView(mode: CalendarViewMode, date: Date, weekStartsOn?: Weekday): Date[]; export declare function weekdayShort(d: Date, locale?: string): string; export declare function formatTime(d: Date, locale?: string): string; /** "0:00".."23:00" rail labels — 24-hour, unambiguous across locales. */ export declare function hourLabel(hour: number): string; /** Agenda day heading: "Thu 12 March". */ export declare function dayHeading(d: Date, locale?: string): string; /** Header title: "March 2026" (month/agenda) or the week/day range. */ export declare function viewTitle(mode: CalendarViewMode, date: Date, weekStartsOn: Weekday, locale?: string): string;