@zag-js/date-utils 0.10.2 → 0.10.4
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/align.d.ts +4 -7
- package/dist/align.js +11 -83
- package/dist/align.mjs +24 -9
- package/dist/assertion.d.ts +10 -13
- package/dist/assertion.js +19 -48
- package/dist/assertion.mjs +36 -20
- package/dist/constrain.d.ts +6 -9
- package/dist/constrain.js +26 -52
- package/dist/constrain.mjs +58 -14
- package/dist/duration.d.ts +3 -7
- package/dist/duration.js +6 -30
- package/dist/duration.mjs +18 -8
- package/dist/format-date.d.ts +2 -5
- package/dist/format-date.js +32 -54
- package/dist/format-date.mjs +53 -6
- package/dist/format-range.d.ts +2 -5
- package/dist/format-range.js +5 -28
- package/dist/format-range.mjs +24 -6
- package/dist/format-selected-date.d.ts +2 -5
- package/dist/format-selected-date.js +10 -77
- package/dist/format-selected-date.mjs +15 -9
- package/dist/format-visible-range.d.ts +2 -5
- package/dist/format-visible-range.js +12 -68
- package/dist/format-visible-range.mjs +22 -9
- package/dist/get-day-formatter.d.ts +2 -5
- package/dist/get-day-formatter.js +9 -37
- package/dist/get-day-formatter.mjs +16 -7
- package/dist/get-decade-range.d.ts +1 -3
- package/dist/get-decade-range.js +5 -28
- package/dist/get-decade-range.mjs +11 -6
- package/dist/get-end-of-week.d.ts +2 -6
- package/dist/get-era-format.d.ts +2 -5
- package/dist/get-era-format.js +5 -28
- package/dist/get-era-format.mjs +5 -6
- package/dist/get-month-days.d.ts +3 -6
- package/dist/get-month-days.js +13 -45
- package/dist/get-month-days.mjs +24 -9
- package/dist/get-month-formatter.d.ts +2 -5
- package/dist/get-month-formatter.js +10 -38
- package/dist/get-month-formatter.mjs +15 -7
- package/dist/get-month-names.d.ts +1 -3
- package/dist/get-month-names.js +5 -28
- package/dist/get-month-names.mjs +11 -6
- package/dist/get-start-of-week.d.ts +2 -6
- package/dist/get-start-of-week.js +10 -32
- package/dist/get-start-of-week.mjs +9 -6
- package/dist/get-week-days.d.ts +3 -7
- package/dist/get-week-days.js +8 -55
- package/dist/get-week-days.mjs +11 -8
- package/dist/get-weekday-formats.d.ts +2 -5
- package/dist/get-weekday-formats.js +10 -32
- package/dist/get-weekday-formats.mjs +18 -6
- package/dist/get-year-range.d.ts +2 -4
- package/dist/get-year-range.js +5 -28
- package/dist/get-year-range.mjs +9 -6
- package/dist/index.d.ts +20 -21
- package/dist/index.js +74 -740
- package/dist/index.mjs +19 -138
- package/dist/mutation.d.ts +10 -14
- package/dist/mutation.js +17 -59
- package/dist/mutation.mjs +40 -21
- package/dist/pagination.d.ts +19 -23
- package/dist/pagination.js +35 -134
- package/dist/pagination.mjs +179 -25
- package/dist/parse-date.d.ts +2 -5
- package/dist/parse-date.js +13 -35
- package/dist/parse-date.mjs +40 -6
- package/dist/types.d.ts +8 -11
- package/package.json +3 -8
- package/src/assertion.ts +1 -1
- package/src/constrain.ts +2 -2
- package/src/format-date.ts +1 -1
- package/src/format-selected-date.ts +1 -1
- package/src/format-visible-range.ts +1 -1
- package/src/get-month-days.ts +1 -1
- package/src/get-start-of-week.ts +1 -1
- package/src/get-weekday-formats.ts +1 -1
- package/src/mutation.ts +8 -1
- package/src/pagination.ts +8 -1
- package/dist/chunk-5HGHDJ3L.mjs +0 -14
- package/dist/chunk-6FNTXW54.mjs +0 -52
- package/dist/chunk-6LXTZHZP.mjs +0 -22
- package/dist/chunk-AMZ7CJ5F.mjs +0 -18
- package/dist/chunk-BUT5IUNZ.mjs +0 -32
- package/dist/chunk-FJKH6IJZ.mjs +0 -21
- package/dist/chunk-G4VVKINZ.mjs +0 -14
- package/dist/chunk-HKHGJ6WS.mjs +0 -27
- package/dist/chunk-HLAN6TUA.mjs +0 -45
- package/dist/chunk-KBGJA6NB.mjs +0 -55
- package/dist/chunk-KLHRN7WS.mjs +0 -20
- package/dist/chunk-KN3YMOSL.mjs +0 -8
- package/dist/chunk-KQVWH4YA.mjs +0 -29
- package/dist/chunk-LGEGBP3O.mjs +0 -20
- package/dist/chunk-MGPXEJO4.mjs +0 -71
- package/dist/chunk-NV7UFBMY.mjs +0 -30
- package/dist/chunk-POBWDZPE.mjs +0 -200
- package/dist/chunk-SI75FOJ2.mjs +0 -11
- package/dist/chunk-TTJVXKJY.mjs +0 -12
- package/dist/chunk-WQYMLJUJ.mjs +0 -42
- package/dist/chunk-ZSLC7OI2.mjs +0 -22
- package/dist/get-end-of-week.js +0 -42
- package/dist/get-end-of-week.mjs +0 -11
- package/dist/types.js +0 -18
- package/dist/types.mjs +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,138 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from
|
|
20
|
-
import {
|
|
21
|
-
getAdjustedDateFn,
|
|
22
|
-
getNextPage,
|
|
23
|
-
getNextRow,
|
|
24
|
-
getNextSection,
|
|
25
|
-
getPreviousPage,
|
|
26
|
-
getPreviousRow,
|
|
27
|
-
getPreviousSection,
|
|
28
|
-
getSectionEnd,
|
|
29
|
-
getSectionStart
|
|
30
|
-
} from "./chunk-POBWDZPE.mjs";
|
|
31
|
-
import {
|
|
32
|
-
parseDateString
|
|
33
|
-
} from "./chunk-WQYMLJUJ.mjs";
|
|
34
|
-
import {
|
|
35
|
-
getDecadeRange
|
|
36
|
-
} from "./chunk-G4VVKINZ.mjs";
|
|
37
|
-
import {
|
|
38
|
-
getDaysInWeek,
|
|
39
|
-
getMonthDays
|
|
40
|
-
} from "./chunk-NV7UFBMY.mjs";
|
|
41
|
-
import {
|
|
42
|
-
getMonthNames
|
|
43
|
-
} from "./chunk-5HGHDJ3L.mjs";
|
|
44
|
-
import "./chunk-SI75FOJ2.mjs";
|
|
45
|
-
import {
|
|
46
|
-
alignDate,
|
|
47
|
-
alignStartDate
|
|
48
|
-
} from "./chunk-BUT5IUNZ.mjs";
|
|
49
|
-
import {
|
|
50
|
-
isDateDisabled,
|
|
51
|
-
isDateEqual,
|
|
52
|
-
isDateInvalid,
|
|
53
|
-
isDateOutsideVisibleRange,
|
|
54
|
-
isDateUnavailable,
|
|
55
|
-
isNextVisibleRangeInvalid,
|
|
56
|
-
isPreviousVisibleRangeInvalid,
|
|
57
|
-
isTodayDate
|
|
58
|
-
} from "./chunk-HLAN6TUA.mjs";
|
|
59
|
-
import {
|
|
60
|
-
alignCenter,
|
|
61
|
-
alignEnd,
|
|
62
|
-
alignStart,
|
|
63
|
-
constrainStart,
|
|
64
|
-
constrainValue
|
|
65
|
-
} from "./chunk-MGPXEJO4.mjs";
|
|
66
|
-
import {
|
|
67
|
-
getEndDate,
|
|
68
|
-
getUnitDuration
|
|
69
|
-
} from "./chunk-ZSLC7OI2.mjs";
|
|
70
|
-
import {
|
|
71
|
-
formatDate
|
|
72
|
-
} from "./chunk-KBGJA6NB.mjs";
|
|
73
|
-
import {
|
|
74
|
-
formatSelectedDate
|
|
75
|
-
} from "./chunk-6LXTZHZP.mjs";
|
|
76
|
-
import {
|
|
77
|
-
formatRange
|
|
78
|
-
} from "./chunk-HKHGJ6WS.mjs";
|
|
79
|
-
import {
|
|
80
|
-
formatVisibleRange
|
|
81
|
-
} from "./chunk-KQVWH4YA.mjs";
|
|
82
|
-
import {
|
|
83
|
-
getMonthFormatter
|
|
84
|
-
} from "./chunk-LGEGBP3O.mjs";
|
|
85
|
-
import {
|
|
86
|
-
getDayFormatter
|
|
87
|
-
} from "./chunk-FJKH6IJZ.mjs";
|
|
88
|
-
import "./chunk-KN3YMOSL.mjs";
|
|
89
|
-
export {
|
|
90
|
-
alignCenter,
|
|
91
|
-
alignDate,
|
|
92
|
-
alignEnd,
|
|
93
|
-
alignStart,
|
|
94
|
-
alignStartDate,
|
|
95
|
-
constrainStart,
|
|
96
|
-
constrainValue,
|
|
97
|
-
formatDate,
|
|
98
|
-
formatRange,
|
|
99
|
-
formatSelectedDate,
|
|
100
|
-
formatVisibleRange,
|
|
101
|
-
getAdjustedDateFn,
|
|
102
|
-
getDayFormatter,
|
|
103
|
-
getDaysInWeek,
|
|
104
|
-
getDecadeRange,
|
|
105
|
-
getEndDate,
|
|
106
|
-
getMonthDays,
|
|
107
|
-
getMonthFormatter,
|
|
108
|
-
getMonthNames,
|
|
109
|
-
getNextDay,
|
|
110
|
-
getNextPage,
|
|
111
|
-
getNextRow,
|
|
112
|
-
getNextSection,
|
|
113
|
-
getPreviousAvailableDate,
|
|
114
|
-
getPreviousDay,
|
|
115
|
-
getPreviousPage,
|
|
116
|
-
getPreviousRow,
|
|
117
|
-
getPreviousSection,
|
|
118
|
-
getSectionEnd,
|
|
119
|
-
getSectionStart,
|
|
120
|
-
getTodayDate,
|
|
121
|
-
getUnitDuration,
|
|
122
|
-
getWeekDays,
|
|
123
|
-
getWeekdayFormats,
|
|
124
|
-
getYearsRange,
|
|
125
|
-
isDateDisabled,
|
|
126
|
-
isDateEqual,
|
|
127
|
-
isDateInvalid,
|
|
128
|
-
isDateOutsideVisibleRange,
|
|
129
|
-
isDateUnavailable,
|
|
130
|
-
isNextVisibleRangeInvalid,
|
|
131
|
-
isPreviousVisibleRangeInvalid,
|
|
132
|
-
isTodayDate,
|
|
133
|
-
parseDateString,
|
|
134
|
-
setCalendar,
|
|
135
|
-
setDate,
|
|
136
|
-
setMonth,
|
|
137
|
-
setYear
|
|
138
|
-
};
|
|
1
|
+
export { alignDate, alignStartDate } from './align.mjs';
|
|
2
|
+
export { isDateDisabled, isDateEqual, isDateInvalid, isDateOutsideVisibleRange, isDateUnavailable, isNextVisibleRangeInvalid, isPreviousVisibleRangeInvalid, isTodayDate } from './assertion.mjs';
|
|
3
|
+
export { alignCenter, alignEnd, alignStart, constrainStart, constrainValue } from './constrain.mjs';
|
|
4
|
+
export { getEndDate, getUnitDuration } from './duration.mjs';
|
|
5
|
+
export { formatDate } from './format-date.mjs';
|
|
6
|
+
export { formatRange } from './format-range.mjs';
|
|
7
|
+
export { formatSelectedDate } from './format-selected-date.mjs';
|
|
8
|
+
export { formatVisibleRange } from './format-visible-range.mjs';
|
|
9
|
+
export { getDayFormatter } from './get-day-formatter.mjs';
|
|
10
|
+
export { getDecadeRange } from './get-decade-range.mjs';
|
|
11
|
+
export { getDaysInWeek, getMonthDays } from './get-month-days.mjs';
|
|
12
|
+
export { getMonthFormatter } from './get-month-formatter.mjs';
|
|
13
|
+
export { getMonthNames } from './get-month-names.mjs';
|
|
14
|
+
export { getWeekDays } from './get-week-days.mjs';
|
|
15
|
+
export { getWeekdayFormats } from './get-weekday-formats.mjs';
|
|
16
|
+
export { getYearsRange } from './get-year-range.mjs';
|
|
17
|
+
export { getNextDay, getPreviousAvailableDate, getPreviousDay, getTodayDate, setCalendar, setDate, setMonth, setYear } from './mutation.mjs';
|
|
18
|
+
export { getAdjustedDateFn, getNextPage, getNextRow, getNextSection, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart } from './pagination.mjs';
|
|
19
|
+
export { parseDateString } from './parse-date.mjs';
|
package/dist/mutation.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function
|
|
8
|
-
declare function
|
|
9
|
-
declare function
|
|
10
|
-
declare function
|
|
11
|
-
declare function setDate(date: DateValue, startDate: DateValue, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue, maxValue: DateValue): DateValue | undefined;
|
|
12
|
-
declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue, locale: string, isDateUnavailable?: DateAvailableFn): DateValue | undefined;
|
|
13
|
-
|
|
14
|
-
export { getNextDay, getPreviousAvailableDate, getPreviousDay, getTodayDate, setCalendar, setDate, setMonth, setYear };
|
|
1
|
+
import { CalendarDate, CalendarDateTime, ZonedDateTime, type Calendar, type DateValue } from '@internationalized/date';
|
|
2
|
+
import type { DateAvailableFn } from "./types";
|
|
3
|
+
export declare function getTodayDate(timeZone?: string): CalendarDate;
|
|
4
|
+
export declare function getNextDay(date: DateValue): CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
5
|
+
export declare function getPreviousDay(date: DateValue): CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
6
|
+
export declare function setMonth(date: DateValue, month: number): CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
7
|
+
export declare function setYear(date: DateValue, year: number): CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
8
|
+
export declare function setCalendar(date: DateValue, calendar: Calendar): CalendarDateTime;
|
|
9
|
+
export declare function setDate(date: DateValue, startDate: DateValue, isDateUnavailable: DateAvailableFn, locale: string, minValue: DateValue, maxValue: DateValue): DateValue | undefined;
|
|
10
|
+
export declare function getPreviousAvailableDate(date: DateValue, minValue: DateValue, locale: string, isDateUnavailable?: DateAvailableFn): DateValue | undefined;
|
package/dist/mutation.js
CHANGED
|
@@ -1,52 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
var mutation_exports = {};
|
|
22
|
-
__export(mutation_exports, {
|
|
23
|
-
getNextDay: () => getNextDay,
|
|
24
|
-
getPreviousAvailableDate: () => getPreviousAvailableDate,
|
|
25
|
-
getPreviousDay: () => getPreviousDay,
|
|
26
|
-
getTodayDate: () => getTodayDate,
|
|
27
|
-
setCalendar: () => setCalendar,
|
|
28
|
-
setDate: () => setDate,
|
|
29
|
-
setMonth: () => setMonth,
|
|
30
|
-
setYear: () => setYear
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(mutation_exports);
|
|
33
|
-
var import_date2 = require("@internationalized/date");
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
34
4
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
function constrainValue(date, minValue, maxValue) {
|
|
38
|
-
if (minValue) {
|
|
39
|
-
date = (0, import_date.maxDate)(date, (0, import_date.toCalendarDate)(minValue));
|
|
40
|
-
}
|
|
41
|
-
if (maxValue) {
|
|
42
|
-
date = (0, import_date.minDate)(date, (0, import_date.toCalendarDate)(maxValue));
|
|
43
|
-
}
|
|
44
|
-
return date;
|
|
45
|
-
}
|
|
5
|
+
const date = require('@internationalized/date');
|
|
6
|
+
const constrain = require('./constrain.js');
|
|
46
7
|
|
|
47
|
-
// src/mutation.ts
|
|
48
8
|
function getTodayDate(timeZone) {
|
|
49
|
-
return
|
|
9
|
+
return date.today(timeZone ?? date.getLocalTimeZone());
|
|
50
10
|
}
|
|
51
11
|
function getNextDay(date) {
|
|
52
12
|
return date.add({ days: 1 });
|
|
@@ -60,12 +20,12 @@ function setMonth(date, month) {
|
|
|
60
20
|
function setYear(date, year) {
|
|
61
21
|
return date.set({ year });
|
|
62
22
|
}
|
|
63
|
-
function setCalendar(date, calendar) {
|
|
64
|
-
return
|
|
23
|
+
function setCalendar(date$1, calendar) {
|
|
24
|
+
return date.toCalendar(date.toCalendarDateTime(date$1), calendar);
|
|
65
25
|
}
|
|
66
26
|
function setDate(date, startDate, isDateUnavailable, locale, minValue, maxValue) {
|
|
67
27
|
let result;
|
|
68
|
-
result = constrainValue(date, minValue, maxValue);
|
|
28
|
+
result = constrain.constrainValue(date, minValue, maxValue);
|
|
69
29
|
result = getPreviousAvailableDate(date, startDate, locale, isDateUnavailable);
|
|
70
30
|
return result;
|
|
71
31
|
}
|
|
@@ -80,14 +40,12 @@ function getPreviousAvailableDate(date, minValue, locale, isDateUnavailable) {
|
|
|
80
40
|
return date;
|
|
81
41
|
}
|
|
82
42
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
setYear
|
|
93
|
-
});
|
|
43
|
+
|
|
44
|
+
exports.getNextDay = getNextDay;
|
|
45
|
+
exports.getPreviousAvailableDate = getPreviousAvailableDate;
|
|
46
|
+
exports.getPreviousDay = getPreviousDay;
|
|
47
|
+
exports.getTodayDate = getTodayDate;
|
|
48
|
+
exports.setCalendar = setCalendar;
|
|
49
|
+
exports.setDate = setDate;
|
|
50
|
+
exports.setMonth = setMonth;
|
|
51
|
+
exports.setYear = setYear;
|
package/dist/mutation.mjs
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
1
|
+
import { today, getLocalTimeZone, toCalendar, toCalendarDateTime } from '@internationalized/date';
|
|
2
|
+
import { constrainValue } from './constrain.mjs';
|
|
3
|
+
|
|
4
|
+
function getTodayDate(timeZone) {
|
|
5
|
+
return today(timeZone ?? getLocalTimeZone());
|
|
6
|
+
}
|
|
7
|
+
function getNextDay(date) {
|
|
8
|
+
return date.add({ days: 1 });
|
|
9
|
+
}
|
|
10
|
+
function getPreviousDay(date) {
|
|
11
|
+
return date.subtract({ days: 1 });
|
|
12
|
+
}
|
|
13
|
+
function setMonth(date, month) {
|
|
14
|
+
return date.set({ month });
|
|
15
|
+
}
|
|
16
|
+
function setYear(date, year) {
|
|
17
|
+
return date.set({ year });
|
|
18
|
+
}
|
|
19
|
+
function setCalendar(date, calendar) {
|
|
20
|
+
return toCalendar(toCalendarDateTime(date), calendar);
|
|
21
|
+
}
|
|
22
|
+
function setDate(date, startDate, isDateUnavailable, locale, minValue, maxValue) {
|
|
23
|
+
let result;
|
|
24
|
+
result = constrainValue(date, minValue, maxValue);
|
|
25
|
+
result = getPreviousAvailableDate(date, startDate, locale, isDateUnavailable);
|
|
26
|
+
return result;
|
|
27
|
+
}
|
|
28
|
+
function getPreviousAvailableDate(date, minValue, locale, isDateUnavailable) {
|
|
29
|
+
if (!isDateUnavailable) {
|
|
30
|
+
return date;
|
|
31
|
+
}
|
|
32
|
+
while (date.compare(minValue) >= 0 && isDateUnavailable(date, locale)) {
|
|
33
|
+
date = date.subtract({ days: 1 });
|
|
34
|
+
}
|
|
35
|
+
if (date.compare(minValue) >= 0) {
|
|
36
|
+
return date;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { getNextDay, getPreviousAvailableDate, getPreviousDay, getTodayDate, setCalendar, setDate, setMonth, setYear };
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,53 +1,49 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): (options: {
|
|
1
|
+
import { CalendarDate, CalendarDateTime, ZonedDateTime, type DateDuration, type DateValue } from '@internationalized/date';
|
|
2
|
+
export declare function getAdjustedDateFn(visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): (options: {
|
|
5
3
|
startDate: DateValue;
|
|
6
4
|
focusedDate: DateValue;
|
|
7
5
|
}) => {
|
|
8
6
|
startDate: DateValue;
|
|
9
7
|
focusedDate: DateValue;
|
|
10
|
-
endDate:
|
|
8
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
11
9
|
};
|
|
12
|
-
declare function getNextPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
10
|
+
export declare function getNextPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
13
11
|
startDate: DateValue;
|
|
14
12
|
focusedDate: DateValue;
|
|
15
|
-
endDate:
|
|
13
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
16
14
|
};
|
|
17
|
-
declare function getPreviousPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
15
|
+
export declare function getPreviousPage(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
18
16
|
startDate: DateValue;
|
|
19
17
|
focusedDate: DateValue;
|
|
20
|
-
endDate:
|
|
18
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
21
19
|
};
|
|
22
|
-
declare function getNextRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
20
|
+
export declare function getNextRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
23
21
|
startDate: DateValue;
|
|
24
22
|
focusedDate: DateValue;
|
|
25
|
-
endDate:
|
|
23
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
26
24
|
} | undefined;
|
|
27
|
-
declare function getPreviousRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
25
|
+
export declare function getPreviousRow(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
28
26
|
startDate: DateValue;
|
|
29
27
|
focusedDate: DateValue;
|
|
30
|
-
endDate:
|
|
28
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
31
29
|
} | undefined;
|
|
32
|
-
declare function getSectionStart(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
30
|
+
export declare function getSectionStart(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
33
31
|
startDate: DateValue;
|
|
34
32
|
focusedDate: DateValue;
|
|
35
|
-
endDate:
|
|
33
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
36
34
|
} | undefined;
|
|
37
|
-
declare function getSectionEnd(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
35
|
+
export declare function getSectionEnd(focusedDate: DateValue, startDate: DateValue, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
38
36
|
startDate: DateValue;
|
|
39
37
|
focusedDate: DateValue;
|
|
40
|
-
endDate:
|
|
38
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
41
39
|
} | undefined;
|
|
42
|
-
declare function getNextSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
40
|
+
export declare function getNextSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
43
41
|
startDate: DateValue;
|
|
44
42
|
focusedDate: DateValue;
|
|
45
|
-
endDate:
|
|
43
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
46
44
|
} | undefined;
|
|
47
|
-
declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
45
|
+
export declare function getPreviousSection(focusedDate: DateValue, startDate: DateValue, larger: boolean, visibleDuration: DateDuration, locale: string, minValue?: DateValue, maxValue?: DateValue): {
|
|
48
46
|
startDate: DateValue;
|
|
49
47
|
focusedDate: DateValue;
|
|
50
|
-
endDate:
|
|
48
|
+
endDate: CalendarDate | CalendarDateTime | ZonedDateTime;
|
|
51
49
|
} | undefined;
|
|
52
|
-
|
|
53
|
-
export { getAdjustedDateFn, getNextPage, getNextRow, getNextSection, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart };
|