UNPKG

date-picker-svelte

Version:
34 lines (33 loc) 1.01 kB
export type Locale = { weekdays?: string[]; months?: string[]; shortMonths?: string[]; weekStartsOn?: number; }; export type InnerLocale = { weekdays: string[]; months: string[]; shortMonths: string[]; weekStartsOn: number; }; export declare function getLocaleDefaults(): InnerLocale; export declare function getInnerLocale(locale: Locale): InnerLocale; type Month = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11; type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6; type LocaleWidth = 'short' | 'wide' | 'abbreviated' | 'narrow' | 'any'; type DateFnsLocale = { options?: { weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6; }; localize?: { month: (n: Month, options?: { width?: LocaleWidth; }) => string; day: (i: Day, options?: { width?: LocaleWidth; }) => string; }; }; /** Create a Locale from a date-fns locale */ export declare function localeFromDateFnsLocale(dateFnsLocale: DateFnsLocale): InnerLocale; export {};