UNPKG

3.04 kBTypeScriptView Raw
1import { GenericDateConstructor } from "date-fns";
2import type { FormatOptions as DateFnsFormatOptions, Locale as DateFnsLocale } from "date-fns";
3import { addDays } from "date-fns/addDays";
4import { addMonths } from "date-fns/addMonths";
5import { addWeeks } from "date-fns/addWeeks";
6import { addYears } from "date-fns/addYears";
7import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
8import { differenceInCalendarMonths } from "date-fns/differenceInCalendarMonths";
9import { endOfISOWeek } from "date-fns/endOfISOWeek";
10import { endOfMonth } from "date-fns/endOfMonth";
11import { endOfWeek } from "date-fns/endOfWeek";
12import { endOfYear } from "date-fns/endOfYear";
13import { format } from "date-fns/format";
14import { getISOWeek } from "date-fns/getISOWeek";
15import { getWeek } from "date-fns/getWeek";
16import { isAfter } from "date-fns/isAfter";
17import { isBefore } from "date-fns/isBefore";
18import { isDate } from "date-fns/isDate";
19import { isSameDay } from "date-fns/isSameDay";
20import { isSameMonth } from "date-fns/isSameMonth";
21import { isSameYear } from "date-fns/isSameYear";
22import { max } from "date-fns/max";
23import { min } from "date-fns/min";
24import { setMonth } from "date-fns/setMonth";
25import { setYear } from "date-fns/setYear";
26import { startOfDay } from "date-fns/startOfDay";
27import { startOfISOWeek } from "date-fns/startOfISOWeek";
28import { startOfMonth } from "date-fns/startOfMonth";
29import { startOfWeek } from "date-fns/startOfWeek";
30import { startOfYear } from "date-fns/startOfYear";
31/** The options for the {@link Formatters}. */
32export type FormatOptions = DateFnsFormatOptions;
33/** The options for the {@link Labels}. */
34export type LabelOptions = DateFnsFormatOptions;
35/** The locale used within DayPicker. */
36export type Locale = DateFnsLocale;
37export type { Month as DateFnsMonth } from "date-fns";
38/**
39 * The default date library to use with the date picker.
40 *
41 * @private
42 * @internal
43 */
44export declare const dateLib: {
45 /** The constructor of the date object. */
46 Date: GenericDateConstructor;
47 addDays: typeof addDays;
48 addMonths: typeof addMonths;
49 addWeeks: typeof addWeeks;
50 addYears: typeof addYears;
51 differenceInCalendarDays: typeof differenceInCalendarDays;
52 differenceInCalendarMonths: typeof differenceInCalendarMonths;
53 endOfISOWeek: typeof endOfISOWeek;
54 endOfMonth: typeof endOfMonth;
55 endOfWeek: typeof endOfWeek;
56 endOfYear: typeof endOfYear;
57 format: typeof format;
58 getISOWeek: typeof getISOWeek;
59 getWeek: typeof getWeek;
60 isAfter: typeof isAfter;
61 isBefore: typeof isBefore;
62 isDate: typeof isDate;
63 isSameDay: typeof isSameDay;
64 isSameMonth: typeof isSameMonth;
65 isSameYear: typeof isSameYear;
66 max: typeof max;
67 min: typeof min;
68 setMonth: typeof setMonth;
69 setYear: typeof setYear;
70 startOfDay: typeof startOfDay;
71 startOfISOWeek: typeof startOfISOWeek;
72 startOfMonth: typeof startOfMonth;
73 startOfWeek: typeof startOfWeek;
74 startOfYear: typeof startOfYear;
75};