/** * Locale-aware date formatting built on the native `Intl.DateTimeFormat`. * No locale tables are bundled — output follows the runtime's ICU data for the * given BCP 47 locale tag. */ /** * Get localized weekday names. * * @param locale - BCP 47 locale tag (e.g. 'de-DE') * @param weekStartsOn - Day the week starts on (0=Sun, 1=Mon) * @param format - Name format ('narrow'='M', 'short'='Mo', 'long'='Montag') * @returns Array of 7 weekday name strings, ordered from `weekStartsOn` */ export declare function getWeekdayNames(locale?: string, weekStartsOn?: number, format?: 'narrow' | 'short' | 'long'): string[]; /** Format month and year for header display, e.g. "März 2026", "March 2026". */ export declare function formatMonthYear(year: number, month: number, locale?: string): string; /** Format a date for a detail header, e.g. "Do, 12. März", "Thu, March 12". */ export declare function formatDate(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions): string; /** Format a date for a screen-reader label, e.g. "Donnerstag, 12. März 2026". */ export declare function formatDateFull(date: Date, locale?: string): string; /** * Format a week title for a header, e.g. "KW 12 – März 2026" (de-DE) or * "Week 12 – March 2026" (en-US). Uses the week's Thursday to pick the * month/year (ISO week convention). */ export declare function formatWeekTitle(date: Date, weekStartsOn?: number, locale?: string): string; /** * Format the date span of the week containing `date`, e.g. "15.–21. Juni" * (de-DE) or "Jun 15 – 21" (en-US). The exact shape — and whether the shared * month collapses — follows the locale via `Intl.DateTimeFormat.formatRange`. */ export declare function formatWeekRange(date: Date, locale?: string, weekStartsOn?: number): string; /** * Format an arbitrary date span including the year, e.g. "15. Juni – 5. Juli * 2026" (de-DE). Collapses shared month/year parts per the locale via * `Intl.DateTimeFormat.formatRange`. Suited to a multi-week range-view title; * for a single ISO week prefer {@link formatWeekRange}. */ export declare function formatDateRange(start: Date, end: Date, locale?: string): string; /** * Format a day-view header, e.g. "Do, 19. März 2026" (de-DE) or * "Thu, March 19, 2026" (en-US). */ export declare function formatDayTitle(date: Date, locale?: string): string; /** * Format the clock time of an appointment, e.g. "9:05" / "09:05–10:30 Uhr" * (de-DE), "9:05 AM" / "9:05 – 10:30 AM" (en-US). * * The shape is the locale's own, not a hardcoded 24-hour string: the hour cycle, * the separator, the zero-padding and any suffix all come from ICU via * `Intl.DateTimeFormat`. That is also why the two arms of one locale can look * different — German pads the hour and appends "Uhr" in the *range* pattern * only. Treat the samples above as illustrations, not as a contract: the exact * punctuation follows the runtime's ICU data and shifts between versions (Bun * and Node already disagree on the "Uhr"). * * `end` is rendered **only when it falls on the same calendar day as `start`**. * `formatRange` otherwise widens to the full date on both sides * ("15.6.2026, 09:00 – 17.6.2026, 17:00"), which is a paragraph in a list row. * A caller listing a span across days therefore states one end per row and says * so — `CalendarEventItem` passes `start` on the event's first day and calls * this again with the bare `end` (no second argument) on its last. The guard * doubles as the invalid-`end` net: an unparseable date is never "the same * day", so it drops out instead of making `formatRange` throw inside a * `$derived`. * * @param start - Start of the appointment (local time) * @param end - Optional end; ignored when it is on another day * @param locale - BCP 47 locale tag */ export declare function formatTimeRange(start: Date, end?: Date, locale?: string): string; /** * Format an abbreviated month name for the year grid, e.g. "Mär" (de-DE) or * "Mar" (en-US). * * @param month - Month index (0-11) * @param locale - BCP 47 locale tag */ export declare function formatMonthShort(month: number, locale?: string): string;