@zag-js/date-utils 0.10.4 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +145 -0
- package/dist/index.d.ts +145 -20
- package/dist/index.js +744 -74
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +687 -19
- package/dist/index.mjs.map +1 -0
- package/package.json +2 -2
- package/src/parse-date.ts +12 -9
- package/dist/align.d.ts +0 -4
- package/dist/align.js +0 -29
- package/dist/align.mjs +0 -24
- package/dist/assertion.d.ts +0 -10
- package/dist/assertion.js +0 -47
- package/dist/assertion.mjs +0 -36
- package/dist/constrain.d.ts +0 -6
- package/dist/constrain.js +0 -66
- package/dist/constrain.mjs +0 -58
- package/dist/duration.d.ts +0 -8
- package/dist/duration.js +0 -23
- package/dist/duration.mjs +0 -18
- package/dist/format-date.d.ts +0 -6
- package/dist/format-date.js +0 -57
- package/dist/format-date.mjs +0 -53
- package/dist/format-range.d.ts +0 -2
- package/dist/format-range.js +0 -28
- package/dist/format-range.mjs +0 -24
- package/dist/format-selected-date.d.ts +0 -2
- package/dist/format-selected-date.js +0 -19
- package/dist/format-selected-date.mjs +0 -15
- package/dist/format-visible-range.d.ts +0 -2
- package/dist/format-visible-range.js +0 -26
- package/dist/format-visible-range.mjs +0 -22
- package/dist/get-day-formatter.d.ts +0 -2
- package/dist/get-day-formatter.js +0 -20
- package/dist/get-day-formatter.mjs +0 -16
- package/dist/get-decade-range.d.ts +0 -1
- package/dist/get-decade-range.js +0 -15
- package/dist/get-decade-range.mjs +0 -11
- package/dist/get-end-of-week.d.ts +0 -2
- package/dist/get-era-format.d.ts +0 -2
- package/dist/get-era-format.js +0 -9
- package/dist/get-era-format.mjs +0 -5
- package/dist/get-month-days.d.ts +0 -3
- package/dist/get-month-days.js +0 -29
- package/dist/get-month-days.mjs +0 -24
- package/dist/get-month-formatter.d.ts +0 -2
- package/dist/get-month-formatter.js +0 -19
- package/dist/get-month-formatter.mjs +0 -15
- package/dist/get-month-names.d.ts +0 -1
- package/dist/get-month-names.js +0 -15
- package/dist/get-month-names.mjs +0 -11
- package/dist/get-start-of-week.d.ts +0 -2
- package/dist/get-start-of-week.js +0 -13
- package/dist/get-start-of-week.mjs +0 -9
- package/dist/get-week-days.d.ts +0 -7
- package/dist/get-week-days.js +0 -15
- package/dist/get-week-days.mjs +0 -11
- package/dist/get-weekday-formats.d.ts +0 -7
- package/dist/get-weekday-formats.js +0 -22
- package/dist/get-weekday-formats.mjs +0 -18
- package/dist/get-year-range.d.ts +0 -5
- package/dist/get-year-range.js +0 -13
- package/dist/get-year-range.mjs +0 -9
- package/dist/mutation.d.ts +0 -10
- package/dist/mutation.js +0 -51
- package/dist/mutation.mjs +0 -40
- package/dist/pagination.d.ts +0 -49
- package/dist/pagination.js +0 -191
- package/dist/pagination.mjs +0 -179
- package/dist/parse-date.d.ts +0 -2
- package/dist/parse-date.js +0 -44
- package/dist/parse-date.mjs +0 -40
- package/dist/types.d.ts +0 -18
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import * as _internationalized_date from '@internationalized/date';
|
|
2
|
+
import { DateValue, DateDuration, DateFormatter, Calendar, CalendarDateTime } from '@internationalized/date';
|
|
3
|
+
|
|
4
|
+
type DateGranularity = "day" | "hour" | "minute" | "second" | "year" | "month";
|
|
5
|
+
type DateAlignment = "start" | "end" | "center";
|
|
6
|
+
type DateAvailableFn = (date: DateValue, locale: string) => boolean;
|
|
7
|
+
type DateAdjustFn = (options: {
|
|
8
|
+
startDate: DateValue;
|
|
9
|
+
focusedDate: DateValue;
|
|
10
|
+
}) => {
|
|
11
|
+
startDate: DateValue;
|
|
12
|
+
focusedDate: DateValue;
|
|
13
|
+
endDate: DateValue;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare function alignDate(date: DateValue, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
|
|
17
|
+
declare function alignStartDate(date: DateValue, startDate: DateValue, endDate: DateValue, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
|
|
18
|
+
|
|
19
|
+
declare function isTodayDate(date: DateValue, timeZone: string): boolean;
|
|
20
|
+
declare function isDateEqual(dateA: DateValue, dateB?: DateValue | null): boolean;
|
|
21
|
+
declare function isDateInvalid(date: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
22
|
+
declare function isDateDisabled(date: DateValue, startDate: DateValue, endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
23
|
+
declare function isDateUnavailable(date: DateValue | null, isUnavailable: DateAvailableFn | undefined, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
24
|
+
declare function isDateOutsideVisibleRange(date: DateValue, startDate: DateValue, endDate: DateValue): boolean;
|
|
25
|
+
declare function isPreviousVisibleRangeInvalid(startDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
26
|
+
declare function isNextVisibleRangeInvalid(endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
27
|
+
|
|
28
|
+
declare function alignCenter(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
29
|
+
declare function alignStart(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
30
|
+
declare function alignEnd(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
31
|
+
declare function constrainStart(date: DateValue, aligned: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
32
|
+
declare function constrainValue(date: DateValue, minValue?: DateValue, maxValue?: DateValue): DateValue;
|
|
33
|
+
|
|
34
|
+
declare function getUnitDuration(duration: DateDuration): {
|
|
35
|
+
years?: number | undefined;
|
|
36
|
+
months?: number | undefined;
|
|
37
|
+
weeks?: number | undefined;
|
|
38
|
+
days?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
declare function getEndDate(startDate: DateValue, duration: DateDuration): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Formats a date using the given format string as defined in:
|
|
44
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
45
|
+
*/
|
|
46
|
+
declare function formatDate(value: DateValue, formatString: string, locale: string, timeZone?: string): string;
|
|
47
|
+
|
|
48
|
+
declare function formatRange(startDate: DateValue, endDate: DateValue, formatter: DateFormatter, toString: (start: string, end: string) => string, timeZone: string): string;
|
|
49
|
+
|
|
50
|
+
declare function formatSelectedDate(startDate: DateValue, endDate: DateValue | null, locale: string, timeZone: string): string;
|
|
51
|
+
|
|
52
|
+
declare function formatVisibleRange(startDate: DateValue, endDate: DateValue | null, locale: string, timeZone: string): string;
|
|
53
|
+
|
|
54
|
+
declare function getDayFormatter(locale: string, timeZone: string): DateFormatter;
|
|
55
|
+
|
|
56
|
+
declare function getDecadeRange(year: number): number[];
|
|
57
|
+
|
|
58
|
+
declare function getDaysInWeek(weekIndex: number, from: DateValue, locale: string, firstDayOfWeek?: number): DateValue[];
|
|
59
|
+
declare function getMonthDays(from: DateValue, locale: string, numOfWeeks?: number, firstDayOfWeek?: number): DateValue[][];
|
|
60
|
+
|
|
61
|
+
declare function getMonthFormatter(locale: string, timeZone: string): DateFormatter;
|
|
62
|
+
|
|
63
|
+
declare function getMonthNames(locale: string, format?: Intl.DateTimeFormatOptions["month"]): string[];
|
|
64
|
+
|
|
65
|
+
declare function getWeekDays(date: DateValue, startOfWeekProp: number | undefined, timeZone: string, locale: string): {
|
|
66
|
+
value: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
67
|
+
short: string;
|
|
68
|
+
long: string;
|
|
69
|
+
narrow: string;
|
|
70
|
+
}[];
|
|
71
|
+
|
|
72
|
+
declare function getWeekdayFormats(locale: string, timeZone: string): <T extends DateValue | Date>(value: T) => {
|
|
73
|
+
value: T;
|
|
74
|
+
short: string;
|
|
75
|
+
long: string;
|
|
76
|
+
narrow: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
interface YearsRange {
|
|
80
|
+
from: number;
|
|
81
|
+
to: number;
|
|
82
|
+
}
|
|
83
|
+
declare function getYearsRange(range: YearsRange): number[];
|
|
84
|
+
|
|
85
|
+
declare function getTodayDate(timeZone?: string): _internationalized_date.CalendarDate;
|
|
86
|
+
declare function getNextDay(date: DateValue): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
87
|
+
declare function getPreviousDay(date: DateValue): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
88
|
+
declare function setMonth(date: DateValue, month: number): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
89
|
+
declare function setYear(date: DateValue, year: number): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
90
|
+
declare function setCalendar(date: DateValue, calendar: Calendar): _internationalized_date.CalendarDateTime;
|
|
91
|
+
declare function setDate(date: DateValue, startDate: DateValue, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue, maxValue: DateValue): DateValue | undefined;
|
|
92
|
+
declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue, locale: string, isDateUnavailable?: DateAvailableFn): DateValue | undefined;
|
|
93
|
+
|
|
94
|
+
declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): (options: {
|
|
95
|
+
startDate: DateValue;
|
|
96
|
+
focusedDate: DateValue;
|
|
97
|
+
}) => {
|
|
98
|
+
startDate: DateValue;
|
|
99
|
+
focusedDate: DateValue;
|
|
100
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
101
|
+
};
|
|
102
|
+
declare function getNextPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
103
|
+
startDate: DateValue;
|
|
104
|
+
focusedDate: DateValue;
|
|
105
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
106
|
+
};
|
|
107
|
+
declare function getPreviousPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
108
|
+
startDate: DateValue;
|
|
109
|
+
focusedDate: DateValue;
|
|
110
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
111
|
+
};
|
|
112
|
+
declare function getNextRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
113
|
+
startDate: DateValue;
|
|
114
|
+
focusedDate: DateValue;
|
|
115
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
116
|
+
} | undefined;
|
|
117
|
+
declare function getPreviousRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
118
|
+
startDate: DateValue;
|
|
119
|
+
focusedDate: DateValue;
|
|
120
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
121
|
+
} | undefined;
|
|
122
|
+
declare function getSectionStart(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
123
|
+
startDate: DateValue;
|
|
124
|
+
focusedDate: DateValue;
|
|
125
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
126
|
+
} | undefined;
|
|
127
|
+
declare function getSectionEnd(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
128
|
+
startDate: DateValue;
|
|
129
|
+
focusedDate: DateValue;
|
|
130
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
131
|
+
} | undefined;
|
|
132
|
+
declare function getNextSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
133
|
+
startDate: DateValue;
|
|
134
|
+
focusedDate: DateValue;
|
|
135
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
136
|
+
} | undefined;
|
|
137
|
+
declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
138
|
+
startDate: DateValue;
|
|
139
|
+
focusedDate: DateValue;
|
|
140
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
141
|
+
} | undefined;
|
|
142
|
+
|
|
143
|
+
declare function parseDateString(date: string, locale: string, timeZone: string): CalendarDateTime | undefined;
|
|
144
|
+
|
|
145
|
+
export { DateAdjustFn, DateGranularity, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatDate, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getMonthDays, getMonthFormatter, getMonthNames, getNextDay, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousDay, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateDisabled, isDateEqual, isDateInvalid, isDateOutsideVisibleRange, isDateUnavailable, isNextVisibleRangeInvalid, isPreviousVisibleRangeInvalid, isTodayDate, parseDateString, setCalendar, setDate, setMonth, setYear };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import * as _internationalized_date from '@internationalized/date';
|
|
2
|
+
import { DateValue, DateDuration, DateFormatter, Calendar, CalendarDateTime } from '@internationalized/date';
|
|
3
|
+
|
|
4
|
+
type DateGranularity = "day" | "hour" | "minute" | "second" | "year" | "month";
|
|
5
|
+
type DateAlignment = "start" | "end" | "center";
|
|
6
|
+
type DateAvailableFn = (date: DateValue, locale: string) => boolean;
|
|
7
|
+
type DateAdjustFn = (options: {
|
|
8
|
+
startDate: DateValue;
|
|
9
|
+
focusedDate: DateValue;
|
|
10
|
+
}) => {
|
|
11
|
+
startDate: DateValue;
|
|
12
|
+
focusedDate: DateValue;
|
|
13
|
+
endDate: DateValue;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare function alignDate(date: DateValue, alignment: DateAlignment, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
|
|
17
|
+
declare function alignStartDate(date: DateValue, startDate: DateValue, endDate: DateValue, duration: DateDuration, locale: string, min?: DateValue | undefined, max?: DateValue | undefined): DateValue;
|
|
18
|
+
|
|
19
|
+
declare function isTodayDate(date: DateValue, timeZone: string): boolean;
|
|
20
|
+
declare function isDateEqual(dateA: DateValue, dateB?: DateValue | null): boolean;
|
|
21
|
+
declare function isDateInvalid(date: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
22
|
+
declare function isDateDisabled(date: DateValue, startDate: DateValue, endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
23
|
+
declare function isDateUnavailable(date: DateValue | null, isUnavailable: DateAvailableFn | undefined, locale: string, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
24
|
+
declare function isDateOutsideVisibleRange(date: DateValue, startDate: DateValue, endDate: DateValue): boolean;
|
|
25
|
+
declare function isPreviousVisibleRangeInvalid(startDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
26
|
+
declare function isNextVisibleRangeInvalid(endDate: DateValue, minValue?: DateValue | null, maxValue?: DateValue | null): boolean;
|
|
27
|
+
|
|
28
|
+
declare function alignCenter(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
29
|
+
declare function alignStart(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
30
|
+
declare function alignEnd(date: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
31
|
+
declare function constrainStart(date: DateValue, aligned: DateValue, duration: DateDuration, locale: string, min?: DateValue, max?: DateValue): DateValue;
|
|
32
|
+
declare function constrainValue(date: DateValue, minValue?: DateValue, maxValue?: DateValue): DateValue;
|
|
33
|
+
|
|
34
|
+
declare function getUnitDuration(duration: DateDuration): {
|
|
35
|
+
years?: number | undefined;
|
|
36
|
+
months?: number | undefined;
|
|
37
|
+
weeks?: number | undefined;
|
|
38
|
+
days?: number | undefined;
|
|
39
|
+
};
|
|
40
|
+
declare function getEndDate(startDate: DateValue, duration: DateDuration): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Formats a date using the given format string as defined in:
|
|
44
|
+
* https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
45
|
+
*/
|
|
46
|
+
declare function formatDate(value: DateValue, formatString: string, locale: string, timeZone?: string): string;
|
|
47
|
+
|
|
48
|
+
declare function formatRange(startDate: DateValue, endDate: DateValue, formatter: DateFormatter, toString: (start: string, end: string) => string, timeZone: string): string;
|
|
49
|
+
|
|
50
|
+
declare function formatSelectedDate(startDate: DateValue, endDate: DateValue | null, locale: string, timeZone: string): string;
|
|
51
|
+
|
|
52
|
+
declare function formatVisibleRange(startDate: DateValue, endDate: DateValue | null, locale: string, timeZone: string): string;
|
|
53
|
+
|
|
54
|
+
declare function getDayFormatter(locale: string, timeZone: string): DateFormatter;
|
|
55
|
+
|
|
56
|
+
declare function getDecadeRange(year: number): number[];
|
|
57
|
+
|
|
58
|
+
declare function getDaysInWeek(weekIndex: number, from: DateValue, locale: string, firstDayOfWeek?: number): DateValue[];
|
|
59
|
+
declare function getMonthDays(from: DateValue, locale: string, numOfWeeks?: number, firstDayOfWeek?: number): DateValue[][];
|
|
60
|
+
|
|
61
|
+
declare function getMonthFormatter(locale: string, timeZone: string): DateFormatter;
|
|
62
|
+
|
|
63
|
+
declare function getMonthNames(locale: string, format?: Intl.DateTimeFormatOptions["month"]): string[];
|
|
64
|
+
|
|
65
|
+
declare function getWeekDays(date: DateValue, startOfWeekProp: number | undefined, timeZone: string, locale: string): {
|
|
66
|
+
value: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
67
|
+
short: string;
|
|
68
|
+
long: string;
|
|
69
|
+
narrow: string;
|
|
70
|
+
}[];
|
|
71
|
+
|
|
72
|
+
declare function getWeekdayFormats(locale: string, timeZone: string): <T extends DateValue | Date>(value: T) => {
|
|
73
|
+
value: T;
|
|
74
|
+
short: string;
|
|
75
|
+
long: string;
|
|
76
|
+
narrow: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
interface YearsRange {
|
|
80
|
+
from: number;
|
|
81
|
+
to: number;
|
|
82
|
+
}
|
|
83
|
+
declare function getYearsRange(range: YearsRange): number[];
|
|
84
|
+
|
|
85
|
+
declare function getTodayDate(timeZone?: string): _internationalized_date.CalendarDate;
|
|
86
|
+
declare function getNextDay(date: DateValue): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
87
|
+
declare function getPreviousDay(date: DateValue): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
88
|
+
declare function setMonth(date: DateValue, month: number): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
89
|
+
declare function setYear(date: DateValue, year: number): _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
90
|
+
declare function setCalendar(date: DateValue, calendar: Calendar): _internationalized_date.CalendarDateTime;
|
|
91
|
+
declare function setDate(date: DateValue, startDate: DateValue, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue, maxValue: DateValue): DateValue | undefined;
|
|
92
|
+
declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue, locale: string, isDateUnavailable?: DateAvailableFn): DateValue | undefined;
|
|
93
|
+
|
|
94
|
+
declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): (options: {
|
|
95
|
+
startDate: DateValue;
|
|
96
|
+
focusedDate: DateValue;
|
|
97
|
+
}) => {
|
|
98
|
+
startDate: DateValue;
|
|
99
|
+
focusedDate: DateValue;
|
|
100
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
101
|
+
};
|
|
102
|
+
declare function getNextPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
103
|
+
startDate: DateValue;
|
|
104
|
+
focusedDate: DateValue;
|
|
105
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
106
|
+
};
|
|
107
|
+
declare function getPreviousPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
108
|
+
startDate: DateValue;
|
|
109
|
+
focusedDate: DateValue;
|
|
110
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
111
|
+
};
|
|
112
|
+
declare function getNextRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
113
|
+
startDate: DateValue;
|
|
114
|
+
focusedDate: DateValue;
|
|
115
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
116
|
+
} | undefined;
|
|
117
|
+
declare function getPreviousRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
118
|
+
startDate: DateValue;
|
|
119
|
+
focusedDate: DateValue;
|
|
120
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
121
|
+
} | undefined;
|
|
122
|
+
declare function getSectionStart(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
123
|
+
startDate: DateValue;
|
|
124
|
+
focusedDate: DateValue;
|
|
125
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
126
|
+
} | undefined;
|
|
127
|
+
declare function getSectionEnd(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
128
|
+
startDate: DateValue;
|
|
129
|
+
focusedDate: DateValue;
|
|
130
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
131
|
+
} | undefined;
|
|
132
|
+
declare function getNextSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
133
|
+
startDate: DateValue;
|
|
134
|
+
focusedDate: DateValue;
|
|
135
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
136
|
+
} | undefined;
|
|
137
|
+
declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
138
|
+
startDate: DateValue;
|
|
139
|
+
focusedDate: DateValue;
|
|
140
|
+
endDate: _internationalized_date.CalendarDate | _internationalized_date.CalendarDateTime | _internationalized_date.ZonedDateTime;
|
|
141
|
+
} | undefined;
|
|
142
|
+
|
|
143
|
+
declare function parseDateString(date: string, locale: string, timeZone: string): CalendarDateTime | undefined;
|
|
144
|
+
|
|
145
|
+
export { DateAdjustFn, DateGranularity, YearsRange, alignCenter, alignDate, alignEnd, alignStart, alignStartDate, constrainStart, constrainValue, formatDate, formatRange, formatSelectedDate, formatVisibleRange, getAdjustedDateFn, getDayFormatter, getDaysInWeek, getDecadeRange, getEndDate, getMonthDays, getMonthFormatter, getMonthNames, getNextDay, getNextPage, getNextRow, getNextSection, getPreviousAvailableDate, getPreviousDay, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart, getTodayDate, getUnitDuration, getWeekDays, getWeekdayFormats, getYearsRange, isDateDisabled, isDateEqual, isDateInvalid, isDateOutsideVisibleRange, isDateUnavailable, isNextVisibleRangeInvalid, isPreviousVisibleRangeInvalid, isTodayDate, parseDateString, setCalendar, setDate, setMonth, setYear };
|