import { DayParts } from '../utils/day.js'; import { Weekday } from '../utils/weekStart.js'; export declare function getMonthNames(locale: string | undefined): string[]; /** The seven short weekday names, from `weekStart` on. */ export declare function getWeekDays(locale: string | undefined, weekStart: Weekday): string[]; /** The weekday of the 1st, as `Date#getDay()` counts: 0 is Sunday. */ export declare function getStartWeekDayOfMonth(month: number, year: number): Weekday; /** `delta` days from a day, rolling over into the months and years around it. */ export declare function addDays(day: number, month: number, year: number, delta: number): DayParts; /** Today in the user's time zone. */ export declare function getToday(): DayParts; /** A `'YYYY-MM-DD'` day as the field shows it, `dd.mm.yyyy`, or `''` for anything else. */ export declare function getDateString(value: string | null | undefined): string; /** What the field holds, `dd.mm.yyyy`, as `'YYYY-MM-DD'`; `null` while incomplete, or for a day that does not exist. */ export declare function parseDateString(text: string): string | null; export interface DateMaskSelection { start: number; end: number; } export interface DateMaskState { value: string; selection: DateMaskSelection | null; } /** * Auto-corrects a partially typed `dd.mm.yyyy` mask value so a single out-of-range * digit doesn't force the user to backtrack: * - a day "tens" digit > 3 (e.g. typing `4`) becomes `04` and the caret jumps to the month * - a day of `3x` where x > 1 (e.g. `35`) becomes `0x` * - a month "tens" digit > 1 (e.g. `2`) becomes `02` and the caret jumps to the year * - a month `1x` where x > 2 (e.g. `13`) is clamped to `12` * * `previousValue` supplies the digits to retain for the part of the field that isn't * being rewritten. The returned `selection` is the adjusted caret position, or the * passed-in `selection` when no correction applies. */ export declare function correctDateMaskValue(nextValue: string, previousValue: string, selection: DateMaskSelection | null): DateMaskState;