@zag-js/date-utils 0.0.0-dev-20230107115230

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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +19 -0
  3. package/dist/align.d.ts +7 -0
  4. package/dist/align.js +105 -0
  5. package/dist/align.mjs +9 -0
  6. package/dist/assertion.d.ts +13 -0
  7. package/dist/assertion.js +77 -0
  8. package/dist/assertion.mjs +20 -0
  9. package/dist/chunk-2DZ3KIVJ.mjs +73 -0
  10. package/dist/chunk-6NI2PIAA.mjs +27 -0
  11. package/dist/chunk-6XKXGQP6.mjs +32 -0
  12. package/dist/chunk-7JERMWT3.mjs +46 -0
  13. package/dist/chunk-C4U2N3JC.mjs +65 -0
  14. package/dist/chunk-DI2YG6VG.mjs +24 -0
  15. package/dist/chunk-ECAENYV6.mjs +19 -0
  16. package/dist/chunk-EXWX3KZT.mjs +64 -0
  17. package/dist/chunk-FJMTHABG.mjs +8 -0
  18. package/dist/chunk-HP2COJGP.mjs +76 -0
  19. package/dist/chunk-M4F23P2U.mjs +35 -0
  20. package/dist/chunk-TCPXGBJP.mjs +33 -0
  21. package/dist/chunk-TTJVXKJY.mjs +12 -0
  22. package/dist/chunk-VWVBJ5CB.mjs +110 -0
  23. package/dist/chunk-XHAL6X5Z.mjs +27 -0
  24. package/dist/chunk-ZSLC7OI2.mjs +22 -0
  25. package/dist/constrain.d.ts +10 -0
  26. package/dist/constrain.js +97 -0
  27. package/dist/constrain.mjs +14 -0
  28. package/dist/duration.d.ts +11 -0
  29. package/dist/duration.js +47 -0
  30. package/dist/duration.mjs +8 -0
  31. package/dist/format-range.d.ts +6 -0
  32. package/dist/format-range.js +51 -0
  33. package/dist/format-range.mjs +6 -0
  34. package/dist/format-selected-date.d.ts +6 -0
  35. package/dist/format-selected-date.js +86 -0
  36. package/dist/format-selected-date.mjs +9 -0
  37. package/dist/format-visible-range.d.ts +6 -0
  38. package/dist/format-visible-range.js +102 -0
  39. package/dist/format-visible-range.mjs +30 -0
  40. package/dist/get-era-format.d.ts +5 -0
  41. package/dist/get-era-format.js +32 -0
  42. package/dist/get-era-format.mjs +6 -0
  43. package/dist/get-formatter.d.ts +7 -0
  44. package/dist/get-formatter.js +61 -0
  45. package/dist/get-formatter.mjs +9 -0
  46. package/dist/get-month-dates.d.ts +5 -0
  47. package/dist/get-month-dates.js +65 -0
  48. package/dist/get-month-dates.mjs +7 -0
  49. package/dist/get-week-dates.d.ts +7 -0
  50. package/dist/get-week-dates.js +60 -0
  51. package/dist/get-week-dates.mjs +8 -0
  52. package/dist/get-year-range.d.ts +7 -0
  53. package/dist/get-year-range.js +36 -0
  54. package/dist/get-year-range.mjs +6 -0
  55. package/dist/index.d.ts +15 -0
  56. package/dist/index.js +656 -0
  57. package/dist/index.mjs +120 -0
  58. package/dist/mutation.d.ts +13 -0
  59. package/dist/mutation.js +120 -0
  60. package/dist/mutation.mjs +22 -0
  61. package/dist/pagination.d.ts +25 -0
  62. package/dist/pagination.js +193 -0
  63. package/dist/pagination.mjs +22 -0
  64. package/dist/placeholder.d.ts +7 -0
  65. package/dist/placeholder.js +47 -0
  66. package/dist/placeholder.mjs +21 -0
  67. package/dist/segment-constants.d.ts +2 -0
  68. package/dist/segment-constants.js +52 -0
  69. package/dist/segment-constants.mjs +8 -0
  70. package/dist/segment-limit.d.ts +14 -0
  71. package/dist/segment-limit.js +97 -0
  72. package/dist/segment-limit.mjs +6 -0
  73. package/dist/segment-mutation.d.ts +8 -0
  74. package/dist/segment-mutation.js +89 -0
  75. package/dist/segment-mutation.mjs +8 -0
  76. package/dist/segment-parts.d.ts +25 -0
  77. package/dist/segment-parts.js +143 -0
  78. package/dist/segment-parts.mjs +37 -0
  79. package/dist/types-9f60d2f1.d.ts +61 -0
  80. package/dist/types.d.ts +2 -0
  81. package/dist/types.js +18 -0
  82. package/dist/types.mjs +0 -0
  83. package/package.json +53 -0
@@ -0,0 +1,102 @@
1
+ "use strict";
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);
19
+
20
+ // src/format-visible-range.ts
21
+ var format_visible_range_exports = {};
22
+ __export(format_visible_range_exports, {
23
+ formatVisibleRange: () => formatVisibleRange
24
+ });
25
+ module.exports = __toCommonJS(format_visible_range_exports);
26
+ var import_date = require("@internationalized/date");
27
+
28
+ // src/format-range.ts
29
+ function formatRange(ctx, formatter) {
30
+ let parts = formatter.formatRangeToParts(ctx.start.toDate(ctx.timeZone), ctx.end.toDate(ctx.timeZone));
31
+ let separatorIndex = -1;
32
+ for (let i = 0; i < parts.length; i++) {
33
+ let part = parts[i];
34
+ if (part.source === "shared" && part.type === "literal") {
35
+ separatorIndex = i;
36
+ } else if (part.source === "endRange") {
37
+ break;
38
+ }
39
+ }
40
+ let start = "";
41
+ let end = "";
42
+ for (let i = 0; i < parts.length; i++) {
43
+ if (i < separatorIndex) {
44
+ start += parts[i].value;
45
+ } else if (i > separatorIndex) {
46
+ end += parts[i].value;
47
+ }
48
+ }
49
+ return ctx.toString(start, end);
50
+ }
51
+
52
+ // src/get-era-format.ts
53
+ function getEraFormat(date) {
54
+ return (date == null ? void 0 : date.calendar.identifier) === "gregory" && date.era === "BC" ? "short" : void 0;
55
+ }
56
+
57
+ // src/get-formatter.ts
58
+ function getDateFormatter(ctx) {
59
+ const { start, end = start, getDateFormatter: getDateFormatter2, timeZone } = ctx;
60
+ let era = getEraFormat(start) || getEraFormat(end);
61
+ return getDateFormatter2({
62
+ weekday: "long",
63
+ month: "long",
64
+ year: "numeric",
65
+ day: "numeric",
66
+ era,
67
+ timeZone
68
+ });
69
+ }
70
+ function getMonthFormatter(ctx) {
71
+ const { start, end = start, getDateFormatter: getDateFormatter2, timeZone } = ctx;
72
+ let era = getEraFormat(start) || getEraFormat(end);
73
+ return getDateFormatter2({
74
+ month: "long",
75
+ year: "numeric",
76
+ era,
77
+ calendar: start == null ? void 0 : start.calendar.identifier,
78
+ timeZone
79
+ });
80
+ }
81
+
82
+ // src/format-visible-range.ts
83
+ function formatVisibleRange(ctx, isAria) {
84
+ if (!ctx.start)
85
+ return "";
86
+ const { start, end = start, timeZone } = ctx;
87
+ let monthFormatter = getMonthFormatter(ctx);
88
+ let dateFormatter = getDateFormatter(ctx);
89
+ if (!(0, import_date.isSameDay)(start, (0, import_date.startOfMonth)(start))) {
90
+ return isAria ? formatRange(ctx, dateFormatter) : dateFormatter.formatRange(start.toDate(timeZone), end.toDate(timeZone));
91
+ }
92
+ if ((0, import_date.isSameDay)(end, (0, import_date.endOfMonth)(start))) {
93
+ return monthFormatter.format(start.toDate(timeZone));
94
+ }
95
+ if ((0, import_date.isSameDay)(end, (0, import_date.endOfMonth)(end))) {
96
+ return isAria ? formatRange(ctx, monthFormatter) : monthFormatter.formatRange(start.toDate(timeZone), end.toDate(timeZone));
97
+ }
98
+ }
99
+ // Annotate the CommonJS export names for ESM import in node:
100
+ 0 && (module.exports = {
101
+ formatVisibleRange
102
+ });
@@ -0,0 +1,30 @@
1
+ import {
2
+ getDateFormatter,
3
+ getMonthFormatter
4
+ } from "./chunk-TCPXGBJP.mjs";
5
+ import {
6
+ formatRange
7
+ } from "./chunk-XHAL6X5Z.mjs";
8
+ import "./chunk-FJMTHABG.mjs";
9
+
10
+ // src/format-visible-range.ts
11
+ import { endOfMonth, isSameDay, startOfMonth } from "@internationalized/date";
12
+ function formatVisibleRange(ctx, isAria) {
13
+ if (!ctx.start)
14
+ return "";
15
+ const { start, end = start, timeZone } = ctx;
16
+ let monthFormatter = getMonthFormatter(ctx);
17
+ let dateFormatter = getDateFormatter(ctx);
18
+ if (!isSameDay(start, startOfMonth(start))) {
19
+ return isAria ? formatRange(ctx, dateFormatter) : dateFormatter.formatRange(start.toDate(timeZone), end.toDate(timeZone));
20
+ }
21
+ if (isSameDay(end, endOfMonth(start))) {
22
+ return monthFormatter.format(start.toDate(timeZone));
23
+ }
24
+ if (isSameDay(end, endOfMonth(end))) {
25
+ return isAria ? formatRange(ctx, monthFormatter) : monthFormatter.formatRange(start.toDate(timeZone), end.toDate(timeZone));
26
+ }
27
+ }
28
+ export {
29
+ formatVisibleRange
30
+ };
@@ -0,0 +1,5 @@
1
+ import { CalendarDate } from '@internationalized/date';
2
+
3
+ declare function getEraFormat(date: CalendarDate | undefined): "short" | undefined;
4
+
5
+ export { getEraFormat };
@@ -0,0 +1,32 @@
1
+ "use strict";
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);
19
+
20
+ // src/get-era-format.ts
21
+ var get_era_format_exports = {};
22
+ __export(get_era_format_exports, {
23
+ getEraFormat: () => getEraFormat
24
+ });
25
+ module.exports = __toCommonJS(get_era_format_exports);
26
+ function getEraFormat(date) {
27
+ return (date == null ? void 0 : date.calendar.identifier) === "gregory" && date.era === "BC" ? "short" : void 0;
28
+ }
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ getEraFormat
32
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ getEraFormat
3
+ } from "./chunk-FJMTHABG.mjs";
4
+ export {
5
+ getEraFormat
6
+ };
@@ -0,0 +1,7 @@
1
+ import * as _internationalized_date from '@internationalized/date';
2
+ import { b as DateDescriptionContext } from './types-9f60d2f1.js';
3
+
4
+ declare function getDateFormatter(ctx: DateDescriptionContext): _internationalized_date.DateFormatter;
5
+ declare function getMonthFormatter(ctx: DateDescriptionContext): _internationalized_date.DateFormatter;
6
+
7
+ export { getDateFormatter, getMonthFormatter };
@@ -0,0 +1,61 @@
1
+ "use strict";
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);
19
+
20
+ // src/get-formatter.ts
21
+ var get_formatter_exports = {};
22
+ __export(get_formatter_exports, {
23
+ getDateFormatter: () => getDateFormatter,
24
+ getMonthFormatter: () => getMonthFormatter
25
+ });
26
+ module.exports = __toCommonJS(get_formatter_exports);
27
+
28
+ // src/get-era-format.ts
29
+ function getEraFormat(date) {
30
+ return (date == null ? void 0 : date.calendar.identifier) === "gregory" && date.era === "BC" ? "short" : void 0;
31
+ }
32
+
33
+ // src/get-formatter.ts
34
+ function getDateFormatter(ctx) {
35
+ const { start, end = start, getDateFormatter: getDateFormatter2, timeZone } = ctx;
36
+ let era = getEraFormat(start) || getEraFormat(end);
37
+ return getDateFormatter2({
38
+ weekday: "long",
39
+ month: "long",
40
+ year: "numeric",
41
+ day: "numeric",
42
+ era,
43
+ timeZone
44
+ });
45
+ }
46
+ function getMonthFormatter(ctx) {
47
+ const { start, end = start, getDateFormatter: getDateFormatter2, timeZone } = ctx;
48
+ let era = getEraFormat(start) || getEraFormat(end);
49
+ return getDateFormatter2({
50
+ month: "long",
51
+ year: "numeric",
52
+ era,
53
+ calendar: start == null ? void 0 : start.calendar.identifier,
54
+ timeZone
55
+ });
56
+ }
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ getDateFormatter,
60
+ getMonthFormatter
61
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ getDateFormatter,
3
+ getMonthFormatter
4
+ } from "./chunk-TCPXGBJP.mjs";
5
+ import "./chunk-FJMTHABG.mjs";
6
+ export {
7
+ getDateFormatter,
8
+ getMonthFormatter
9
+ };
@@ -0,0 +1,5 @@
1
+ import { CalendarDate, DateDuration } from '@internationalized/date';
2
+
3
+ declare function getMonthDates(startDate: CalendarDate, duration: DateDuration, locale: string): (CalendarDate | null)[][];
4
+
5
+ export { getMonthDates };
@@ -0,0 +1,65 @@
1
+ "use strict";
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);
19
+
20
+ // src/get-month-dates.ts
21
+ var get_month_dates_exports = {};
22
+ __export(get_month_dates_exports, {
23
+ getMonthDates: () => getMonthDates
24
+ });
25
+ module.exports = __toCommonJS(get_month_dates_exports);
26
+ var import_date2 = require("@internationalized/date");
27
+
28
+ // src/get-week-dates.ts
29
+ var import_date = require("@internationalized/date");
30
+ function getDatesInWeek(weekIndex, fromDate, locale) {
31
+ let date = fromDate.add({ weeks: weekIndex });
32
+ let dates = [];
33
+ date = (0, import_date.startOfWeek)(date, locale);
34
+ let dayOfWeek = (0, import_date.getDayOfWeek)(date, locale);
35
+ for (let i = 0; i < dayOfWeek; i++) {
36
+ dates.push(null);
37
+ }
38
+ while (dates.length < 7) {
39
+ dates.push(date);
40
+ let nextDate = date.add({ days: 1 });
41
+ if ((0, import_date.isSameDay)(date, nextDate)) {
42
+ break;
43
+ }
44
+ date = nextDate;
45
+ }
46
+ while (dates.length < 7) {
47
+ dates.push(null);
48
+ }
49
+ return dates;
50
+ }
51
+
52
+ // src/get-month-dates.ts
53
+ function getMonthDates(startDate, duration, locale) {
54
+ var _a;
55
+ let weeksInMonth = (0, import_date2.getWeeksInMonth)(startDate, locale);
56
+ let numOfWeeks = (_a = duration.weeks) != null ? _a : weeksInMonth;
57
+ let weekArr = [...new Array(numOfWeeks).keys()];
58
+ return weekArr.map((index) => {
59
+ return getDatesInWeek(index, startDate, locale);
60
+ });
61
+ }
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ getMonthDates
65
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ getMonthDates
3
+ } from "./chunk-ECAENYV6.mjs";
4
+ import "./chunk-M4F23P2U.mjs";
5
+ export {
6
+ getMonthDates
7
+ };
@@ -0,0 +1,7 @@
1
+ import { CalendarDate } from '@internationalized/date';
2
+
3
+ type DatesInWeek = (CalendarDate | null)[];
4
+ declare function getDatesInWeek(weekIndex: number, fromDate: CalendarDate, locale: string): (CalendarDate | null)[];
5
+ declare function getWeekDates(timeZone: string, locale: string): Date[];
6
+
7
+ export { DatesInWeek, getDatesInWeek, getWeekDates };
@@ -0,0 +1,60 @@
1
+ "use strict";
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);
19
+
20
+ // src/get-week-dates.ts
21
+ var get_week_dates_exports = {};
22
+ __export(get_week_dates_exports, {
23
+ getDatesInWeek: () => getDatesInWeek,
24
+ getWeekDates: () => getWeekDates
25
+ });
26
+ module.exports = __toCommonJS(get_week_dates_exports);
27
+ var import_date = require("@internationalized/date");
28
+ function getDatesInWeek(weekIndex, fromDate, locale) {
29
+ let date = fromDate.add({ weeks: weekIndex });
30
+ let dates = [];
31
+ date = (0, import_date.startOfWeek)(date, locale);
32
+ let dayOfWeek = (0, import_date.getDayOfWeek)(date, locale);
33
+ for (let i = 0; i < dayOfWeek; i++) {
34
+ dates.push(null);
35
+ }
36
+ while (dates.length < 7) {
37
+ dates.push(date);
38
+ let nextDate = date.add({ days: 1 });
39
+ if ((0, import_date.isSameDay)(date, nextDate)) {
40
+ break;
41
+ }
42
+ date = nextDate;
43
+ }
44
+ while (dates.length < 7) {
45
+ dates.push(null);
46
+ }
47
+ return dates;
48
+ }
49
+ function getWeekDates(timeZone, locale) {
50
+ let weekStart = (0, import_date.startOfWeek)((0, import_date.today)(timeZone), locale);
51
+ let weekArr = [...new Array(7).keys()];
52
+ return weekArr.map((index) => {
53
+ return weekStart.add({ days: index }).toDate(timeZone);
54
+ });
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ getDatesInWeek,
59
+ getWeekDates
60
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ getDatesInWeek,
3
+ getWeekDates
4
+ } from "./chunk-M4F23P2U.mjs";
5
+ export {
6
+ getDatesInWeek,
7
+ getWeekDates
8
+ };
@@ -0,0 +1,7 @@
1
+ interface YearsRange {
2
+ from: number;
3
+ to: number;
4
+ }
5
+ declare function getYearsRange(range: YearsRange): number[];
6
+
7
+ export { YearsRange, getYearsRange };
@@ -0,0 +1,36 @@
1
+ "use strict";
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);
19
+
20
+ // src/get-year-range.ts
21
+ var get_year_range_exports = {};
22
+ __export(get_year_range_exports, {
23
+ getYearsRange: () => getYearsRange
24
+ });
25
+ module.exports = __toCommonJS(get_year_range_exports);
26
+ function getYearsRange(range) {
27
+ const years = [];
28
+ for (let year = range.from; year <= range.to; year += 1) {
29
+ years.push(year);
30
+ }
31
+ return years;
32
+ }
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ getYearsRange
36
+ });
@@ -0,0 +1,6 @@
1
+ import {
2
+ getYearsRange
3
+ } from "./chunk-TTJVXKJY.mjs";
4
+ export {
5
+ getYearsRange
6
+ };
@@ -0,0 +1,15 @@
1
+ export { alignDate, alignStartDate } from './align.js';
2
+ export { isDateDisabled, isDateEqual, isDateInvalid, isDateOutsideVisibleRange, isDateUnavailable, isNextVisibleRangeInvalid, isPreviousVisibleRangeInvalid, isTodayDate } from './assertion.js';
3
+ export { alignCenter, alignEnd, alignStart, constrainStart, constrainValue } from './constrain.js';
4
+ export { getEndDate, getUnitDuration } from './duration.js';
5
+ export { formatRange } from './format-range.js';
6
+ export { formatSelectedDate } from './format-selected-date.js';
7
+ export { DatesInWeek, getDatesInWeek, getWeekDates } from './get-week-dates.js';
8
+ export { getMonthDates } from './get-month-dates.js';
9
+ export { YearsRange, getYearsRange } from './get-year-range.js';
10
+ export { clampDate, getNextDay, getPreviousDay, getTodayDate, setCalendar, setDate, setMonth, setYear } from './mutation.js';
11
+ export { getNextPage, getNextRow, getNextSection, getPreviousPage, getPreviousRow, getPreviousSection, getSectionEnd, getSectionStart } from './pagination.js';
12
+ export { c as DateGranularity, d as DateSegments, S as SEGMENT_PAGE_STEP, i as isSegmentEditable } from './types-9f60d2f1.js';
13
+ export { getSegmentLimits } from './segment-limit.js';
14
+ export { addSegment, setSegment } from './segment-mutation.js';
15
+ import '@internationalized/date';