import type { Dayjs, OpUnitType, QUnitType } from "dayjs"; import type { XyDatePickerMode, XyDateValue, XyYearQuarterMonthGranularity } from "./types"; /** v-model / valueFormat 默认格式(周以周起始日的日期串存储)。 */ export declare const DATE_PICKER_FORMATS: Record; /** 输入框展示默认格式;未单独指定时周显示为「年-周序」。 */ export declare const DATE_PICKER_DISPLAY_FORMATS: Record; export declare function detectYearQuarterMonthGranularity(value: string): XyYearQuarterMonthGranularity | null; export declare function parseYearQuarterMonthValue(value: string | null | undefined): Dayjs | null; export declare function formatYearQuarterMonthValue(date: Dayjs, granularity: XyYearQuarterMonthGranularity): string; export declare function getDatePickerFormat(picker: XyDatePickerMode, format?: string, kind?: "display" | "value"): string; /** * 按当前 dayjs locale 的 firstDayOfWeek 排列星期标题。 * weekdaysMin 始终以周日开头,需按 firstDayOfWeek 旋转。 */ export declare function getWeekdayLabels(): string[]; export declare function rotateWeekdayLabels(labels: readonly string[], weekStart: number): string[]; export declare function startOfLocaleWeek(date: Dayjs, weekStart: number): Dayjs; export declare function getQuarterLabel(date: Dayjs): string; export declare function getMonthRows(viewDate: Dayjs): { label: string; quarter: number; months: Dayjs[]; }[]; export declare function parseDateValue(value: XyDateValue | null | undefined): Dayjs | null; export declare function parseFormattedDateValue(value: string | null | undefined, format: string): Dayjs | null; export declare function normalizeDateForPicker(date: Dayjs, picker: XyDatePickerMode): Dayjs; export declare function getPickerUnit(picker: XyDatePickerMode): OpUnitType | QUnitType; export declare function isSamePickerValue(left: Dayjs, right: Dayjs | null, picker: XyDatePickerMode): boolean; export declare function isDateOutsideBounds(date: Dayjs, picker: XyDatePickerMode, minDate?: XyDateValue, maxDate?: XyDateValue): boolean; export declare function clampDateToBounds(date: Dayjs, minDate?: XyDateValue, maxDate?: XyDateValue): Dayjs;