@gobrand/tiempo 2.6.2 → 2.6.3
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/{chunk-IBO2U23N.js → chunk-5C3TQSWA.js} +4 -4
- package/dist/chunk-BUX26GTD.js +30 -0
- package/dist/chunk-BUX26GTD.js.map +1 -0
- package/dist/chunk-DKYVFYWM.js +25 -0
- package/dist/chunk-DKYVFYWM.js.map +1 -0
- package/dist/chunk-G2JUEBC5.js +26 -0
- package/dist/chunk-G2JUEBC5.js.map +1 -0
- package/dist/{chunk-MGMLT4L6.js → chunk-JA7SVLAF.js} +4 -4
- package/dist/chunk-OLEOU3XE.js +28 -0
- package/dist/chunk-OLEOU3XE.js.map +1 -0
- package/dist/chunk-TNCLJK4Y.js +38 -0
- package/dist/chunk-TNCLJK4Y.js.map +1 -0
- package/dist/chunk-Y7CIJQ67.js +26 -0
- package/dist/chunk-Y7CIJQ67.js.map +1 -0
- package/dist/eachDayOfInterval.d.ts +69 -0
- package/dist/eachDayOfInterval.d.ts.map +1 -0
- package/dist/eachDayOfInterval.js +8 -0
- package/dist/eachDayOfInterval.js.map +1 -0
- package/dist/eachDayOfInterval.test.d.ts +2 -0
- package/dist/eachDayOfInterval.test.d.ts.map +1 -0
- package/dist/eachHourOfInterval.d.ts +51 -0
- package/dist/eachHourOfInterval.d.ts.map +1 -0
- package/dist/eachHourOfInterval.js +8 -0
- package/dist/eachHourOfInterval.js.map +1 -0
- package/dist/eachHourOfInterval.test.d.ts +2 -0
- package/dist/eachHourOfInterval.test.d.ts.map +1 -0
- package/dist/eachMinuteOfInterval.d.ts +50 -0
- package/dist/eachMinuteOfInterval.d.ts.map +1 -0
- package/dist/eachMinuteOfInterval.js +8 -0
- package/dist/eachMinuteOfInterval.js.map +1 -0
- package/dist/eachMinuteOfInterval.test.d.ts +2 -0
- package/dist/eachMinuteOfInterval.test.d.ts.map +1 -0
- package/dist/eachMonthOfInterval.d.ts +46 -0
- package/dist/eachMonthOfInterval.d.ts.map +1 -0
- package/dist/eachMonthOfInterval.js +8 -0
- package/dist/eachMonthOfInterval.js.map +1 -0
- package/dist/eachMonthOfInterval.test.d.ts +2 -0
- package/dist/eachMonthOfInterval.test.d.ts.map +1 -0
- package/dist/eachWeekOfInterval.d.ts +58 -0
- package/dist/eachWeekOfInterval.d.ts.map +1 -0
- package/dist/eachWeekOfInterval.js +8 -0
- package/dist/eachWeekOfInterval.js.map +1 -0
- package/dist/eachWeekOfInterval.test.d.ts +2 -0
- package/dist/eachWeekOfInterval.test.d.ts.map +1 -0
- package/dist/eachYearOfInterval.d.ts +55 -0
- package/dist/eachYearOfInterval.d.ts.map +1 -0
- package/dist/eachYearOfInterval.js +8 -0
- package/dist/eachYearOfInterval.js.map +1 -0
- package/dist/eachYearOfInterval.test.d.ts +2 -0
- package/dist/eachYearOfInterval.test.d.ts.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +68 -44
- package/dist/isFuture.js +2 -2
- package/dist/isWithinInterval.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-IBO2U23N.js.map → chunk-5C3TQSWA.js.map} +0 -0
- /package/dist/{chunk-MGMLT4L6.js.map → chunk-JA7SVLAF.js.map} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isBefore
|
|
3
|
-
} from "./chunk-WUAIUEH7.js";
|
|
4
1
|
import {
|
|
5
2
|
isAfter
|
|
6
3
|
} from "./chunk-WY63VEXE.js";
|
|
4
|
+
import {
|
|
5
|
+
isBefore
|
|
6
|
+
} from "./chunk-WUAIUEH7.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
9
|
} from "./chunk-MJSZNWCV.js";
|
|
@@ -20,4 +20,4 @@ function isWithinInterval(date, interval) {
|
|
|
20
20
|
export {
|
|
21
21
|
isWithinInterval
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-5C3TQSWA.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachYearOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachYearOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const startYear = startZoned.year;
|
|
12
|
+
const endInTimezone = endZoned.withTimeZone(timezone);
|
|
13
|
+
const endYear = endInTimezone.year;
|
|
14
|
+
const years = [];
|
|
15
|
+
for (let year = startYear; year <= endYear; year++) {
|
|
16
|
+
const firstOfYear = Temporal.PlainDate.from({ year, month: 1, day: 1 });
|
|
17
|
+
years.push(
|
|
18
|
+
firstOfYear.toZonedDateTime({
|
|
19
|
+
timeZone: timezone,
|
|
20
|
+
plainTime: new Temporal.PlainTime()
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
return years;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
eachYearOfInterval
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-BUX26GTD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachYearOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each year within the interval.\n * Each element represents the first moment of the year (January 1st at midnight).\n * The interval is inclusive of both start and end years.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each year in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2022-06-15T10:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-03-20T14:00:00Z[UTC]');\n *\n * const years = eachYearOfInterval({ start, end });\n * // [\n * // 2022-01-01T00:00:00Z[UTC],\n * // 2023-01-01T00:00:00Z[UTC],\n * // 2024-01-01T00:00:00Z[UTC],\n * // 2025-01-01T00:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Single year\n * const start = Temporal.ZonedDateTime.from('2025-01-15T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-12-31T23:59:59Z[UTC]');\n *\n * const years = eachYearOfInterval({ start, end });\n * // [2025-01-01T00:00:00Z[UTC]]\n * ```\n *\n * @example\n * ```ts\n * // With timezone\n * const start = Temporal.ZonedDateTime.from('2024-01-01T00:00:00-05:00[America/New_York]');\n * const end = Temporal.ZonedDateTime.from('2026-06-15T00:00:00-04:00[America/New_York]');\n *\n * const years = eachYearOfInterval({ start, end });\n * // [\n * // 2024-01-01T00:00:00-05:00[America/New_York],\n * // 2025-01-01T00:00:00-05:00[America/New_York],\n * // 2026-01-01T00:00:00-05:00[America/New_York]\n * // ]\n * ```\n */\nexport function eachYearOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n const startYear = startZoned.year;\n\n // Get end year in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endYear = endInTimezone.year;\n\n const years: Temporal.ZonedDateTime[] = [];\n\n for (let year = startYear; year <= endYear; year++) {\n const firstOfYear = Temporal.PlainDate.from({ year, month: 1, day: 1 });\n years.push(\n firstOfYear.toZonedDateTime({\n timeZone: timezone,\n plainTime: new Temporal.PlainTime(),\n })\n );\n }\n\n return years;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAoDlB,SAAS,mBAAmB,UAGN;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAC5B,QAAM,YAAY,WAAW;AAG7B,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,UAAU,cAAc;AAE9B,QAAM,QAAkC,CAAC;AAEzC,WAAS,OAAO,WAAW,QAAQ,SAAS,QAAQ;AAClD,UAAM,cAAc,SAAS,UAAU,KAAK,EAAE,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;AACtE,UAAM;AAAA,MACJ,YAAY,gBAAgB;AAAA,QAC1B,UAAU;AAAA,QACV,WAAW,IAAI,SAAS,UAAU;AAAA,MACpC,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachDayOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachDayOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const startDate = startZoned.toPlainDate();
|
|
12
|
+
const endDate = endZoned.withTimeZone(timezone).toPlainDate();
|
|
13
|
+
const days = [];
|
|
14
|
+
let current = startDate;
|
|
15
|
+
while (Temporal.PlainDate.compare(current, endDate) <= 0) {
|
|
16
|
+
days.push(current.toZonedDateTime({ timeZone: timezone, plainTime: new Temporal.PlainTime() }));
|
|
17
|
+
current = current.add({ days: 1 });
|
|
18
|
+
}
|
|
19
|
+
return days;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
eachDayOfInterval
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-DKYVFYWM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachDayOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each calendar day within the interval.\n * Each element represents the start of day (midnight) in the timezone of the interval start.\n * The interval is inclusive of both start and end days.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each day in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-10T14:00:00Z[UTC]');\n *\n * const days = eachDayOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC],\n * // 2025-01-07T00:00:00Z[UTC],\n * // 2025-01-08T00:00:00Z[UTC],\n * // 2025-01-09T00:00:00Z[UTC],\n * // 2025-01-10T00:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // With timezone - preserves the timezone from start\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00-05:00[America/New_York]');\n * const end = Temporal.ZonedDateTime.from('2025-01-08T14:00:00-05:00[America/New_York]');\n *\n * const days = eachDayOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00-05:00[America/New_York],\n * // 2025-01-07T00:00:00-05:00[America/New_York],\n * // 2025-01-08T00:00:00-05:00[America/New_York]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // With Instant (uses UTC)\n * const start = Temporal.Instant.from('2025-01-06T00:00:00Z');\n * const end = Temporal.Instant.from('2025-01-08T00:00:00Z');\n *\n * const days = eachDayOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC],\n * // 2025-01-07T00:00:00Z[UTC],\n * // 2025-01-08T00:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Single day interval\n * const date = Temporal.ZonedDateTime.from('2025-01-15T12:00:00Z[UTC]');\n *\n * eachDayOfInterval({ start: date, end: date });\n * // [2025-01-15T00:00:00Z[UTC]]\n * ```\n */\nexport function eachDayOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n const startDate = startZoned.toPlainDate();\n const endDate = endZoned.withTimeZone(timezone).toPlainDate();\n\n const days: Temporal.ZonedDateTime[] = [];\n let current = startDate;\n\n while (Temporal.PlainDate.compare(current, endDate) <= 0) {\n days.push(current.toZonedDateTime({ timeZone: timezone, plainTime: new Temporal.PlainTime() }));\n current = current.add({ days: 1 });\n }\n\n return days;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAkElB,SAAS,kBAAkB,UAGL;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAC5B,QAAM,YAAY,WAAW,YAAY;AACzC,QAAM,UAAU,SAAS,aAAa,QAAQ,EAAE,YAAY;AAE5D,QAAM,OAAiC,CAAC;AACxC,MAAI,UAAU;AAEd,SAAO,SAAS,UAAU,QAAQ,SAAS,OAAO,KAAK,GAAG;AACxD,SAAK,KAAK,QAAQ,gBAAgB,EAAE,UAAU,UAAU,WAAW,IAAI,SAAS,UAAU,EAAE,CAAC,CAAC;AAC9F,cAAU,QAAQ,IAAI,EAAE,MAAM,EAAE,CAAC;AAAA,EACnC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachMinuteOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachMinuteOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const startMinute = startZoned.round({ smallestUnit: "minute", roundingMode: "floor" });
|
|
12
|
+
const endInTimezone = endZoned.withTimeZone(timezone);
|
|
13
|
+
const endMinute = endInTimezone.round({ smallestUnit: "minute", roundingMode: "floor" });
|
|
14
|
+
const minutes = [];
|
|
15
|
+
let current = startMinute;
|
|
16
|
+
while (Temporal.ZonedDateTime.compare(current, endMinute) <= 0) {
|
|
17
|
+
minutes.push(current);
|
|
18
|
+
current = current.add({ minutes: 1 });
|
|
19
|
+
}
|
|
20
|
+
return minutes;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
eachMinuteOfInterval
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=chunk-G2JUEBC5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachMinuteOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each minute within the interval.\n * Each element represents the start of the minute (seconds/etc. set to 0).\n * The interval is inclusive of both start and end minutes.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * Warning: Large intervals can produce very large arrays. For example, a 24-hour\n * interval produces 1,441 elements. Consider whether this is appropriate for your use case.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each minute in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:30:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-06T10:33:45Z[UTC]');\n *\n * const minutes = eachMinuteOfInterval({ start, end });\n * // [\n * // 2025-01-06T10:30:00Z[UTC],\n * // 2025-01-06T10:31:00Z[UTC],\n * // 2025-01-06T10:32:00Z[UTC],\n * // 2025-01-06T10:33:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-hour boundary\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:58:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-06T11:02:00Z[UTC]');\n *\n * const minutes = eachMinuteOfInterval({ start, end });\n * // [\n * // 2025-01-06T10:58:00Z[UTC],\n * // 2025-01-06T10:59:00Z[UTC],\n * // 2025-01-06T11:00:00Z[UTC],\n * // 2025-01-06T11:01:00Z[UTC],\n * // 2025-01-06T11:02:00Z[UTC]\n * // ]\n * ```\n */\nexport function eachMinuteOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n\n // Get start of the starting minute\n const startMinute = startZoned.round({ smallestUnit: 'minute', roundingMode: 'floor' });\n\n // Get start of the ending minute in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endMinute = endInTimezone.round({ smallestUnit: 'minute', roundingMode: 'floor' });\n\n const minutes: Temporal.ZonedDateTime[] = [];\n let current = startMinute;\n\n while (Temporal.ZonedDateTime.compare(current, endMinute) <= 0) {\n minutes.push(current);\n current = current.add({ minutes: 1 });\n }\n\n return minutes;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AA+ClB,SAAS,qBAAqB,UAGR;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAG5B,QAAM,cAAc,WAAW,MAAM,EAAE,cAAc,UAAU,cAAc,QAAQ,CAAC;AAGtF,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,YAAY,cAAc,MAAM,EAAE,cAAc,UAAU,cAAc,QAAQ,CAAC;AAEvF,QAAM,UAAoC,CAAC;AAC3C,MAAI,UAAU;AAEd,SAAO,SAAS,cAAc,QAAQ,SAAS,SAAS,KAAK,GAAG;AAC9D,YAAQ,KAAK,OAAO;AACpB,cAAU,QAAQ,IAAI,EAAE,SAAS,EAAE,CAAC;AAAA,EACtC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
nowZoned
|
|
3
|
-
} from "./chunk-QFNGYTTH.js";
|
|
4
1
|
import {
|
|
5
2
|
isAfter
|
|
6
3
|
} from "./chunk-WY63VEXE.js";
|
|
4
|
+
import {
|
|
5
|
+
nowZoned
|
|
6
|
+
} from "./chunk-QFNGYTTH.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeTemporalInput
|
|
9
9
|
} from "./chunk-MJSZNWCV.js";
|
|
@@ -17,4 +17,4 @@ function isFuture(date) {
|
|
|
17
17
|
export {
|
|
18
18
|
isFuture
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-JA7SVLAF.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachWeekOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachWeekOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const daysToSubtractStart = startZoned.dayOfWeek - 1;
|
|
12
|
+
const startMonday = startZoned.subtract({ days: daysToSubtractStart }).startOfDay();
|
|
13
|
+
const endInTimezone = endZoned.withTimeZone(timezone);
|
|
14
|
+
const daysToSubtractEnd = endInTimezone.dayOfWeek - 1;
|
|
15
|
+
const endMonday = endInTimezone.subtract({ days: daysToSubtractEnd }).startOfDay();
|
|
16
|
+
const weeks = [];
|
|
17
|
+
let current = startMonday;
|
|
18
|
+
while (Temporal.ZonedDateTime.compare(current, endMonday) <= 0) {
|
|
19
|
+
weeks.push(current);
|
|
20
|
+
current = current.add({ weeks: 1 });
|
|
21
|
+
}
|
|
22
|
+
return weeks;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
eachWeekOfInterval
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-OLEOU3XE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachWeekOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each week within the interval.\n * Each element represents the first moment of the week (Monday at midnight).\n * Uses ISO 8601 week definition: weeks start on Monday.\n * The interval is inclusive of both start and end weeks.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each week (Monday) in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00Z[UTC]'); // Monday\n * const end = Temporal.ZonedDateTime.from('2025-01-22T14:00:00Z[UTC]'); // Wednesday\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC], // Week 2\n * // 2025-01-13T00:00:00Z[UTC], // Week 3\n * // 2025-01-20T00:00:00Z[UTC] // Week 4\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Mid-week start\n * const start = Temporal.ZonedDateTime.from('2025-01-08T10:00:00Z[UTC]'); // Wednesday\n * const end = Temporal.ZonedDateTime.from('2025-01-15T14:00:00Z[UTC]'); // Wednesday\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2025-01-06T00:00:00Z[UTC], // Monday of week containing Jan 8\n * // 2025-01-13T00:00:00Z[UTC] // Monday of week containing Jan 15\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-12-25T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-08T00:00:00Z[UTC]');\n *\n * const weeks = eachWeekOfInterval({ start, end });\n * // [\n * // 2024-12-23T00:00:00Z[UTC], // Monday of week containing Dec 25\n * // 2024-12-30T00:00:00Z[UTC], // Monday of week containing Dec 30\n * // 2025-01-06T00:00:00Z[UTC] // Monday of week containing Jan 8\n * // ]\n * ```\n */\nexport function eachWeekOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n\n // Get Monday of the starting week\n // dayOfWeek: 1 = Monday, 7 = Sunday (ISO 8601)\n const daysToSubtractStart = startZoned.dayOfWeek - 1;\n const startMonday = startZoned.subtract({ days: daysToSubtractStart }).startOfDay();\n\n // Get Monday of the ending week\n const endInTimezone = endZoned.withTimeZone(timezone);\n const daysToSubtractEnd = endInTimezone.dayOfWeek - 1;\n const endMonday = endInTimezone.subtract({ days: daysToSubtractEnd }).startOfDay();\n\n const weeks: Temporal.ZonedDateTime[] = [];\n let current = startMonday;\n\n while (Temporal.ZonedDateTime.compare(current, endMonday) <= 0) {\n weeks.push(current);\n current = current.add({ weeks: 1 });\n }\n\n return weeks;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAuDlB,SAAS,mBAAmB,UAGN;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAI5B,QAAM,sBAAsB,WAAW,YAAY;AACnD,QAAM,cAAc,WAAW,SAAS,EAAE,MAAM,oBAAoB,CAAC,EAAE,WAAW;AAGlF,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,oBAAoB,cAAc,YAAY;AACpD,QAAM,YAAY,cAAc,SAAS,EAAE,MAAM,kBAAkB,CAAC,EAAE,WAAW;AAEjF,QAAM,QAAkC,CAAC;AACzC,MAAI,UAAU;AAEd,SAAO,SAAS,cAAc,QAAQ,SAAS,SAAS,KAAK,GAAG;AAC9D,UAAM,KAAK,OAAO;AAClB,cAAU,QAAQ,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EACpC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachMonthOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachMonthOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const startYearMonth = Temporal.PlainYearMonth.from({
|
|
12
|
+
year: startZoned.year,
|
|
13
|
+
month: startZoned.month
|
|
14
|
+
});
|
|
15
|
+
const endInTimezone = endZoned.withTimeZone(timezone);
|
|
16
|
+
const endYearMonth = Temporal.PlainYearMonth.from({
|
|
17
|
+
year: endInTimezone.year,
|
|
18
|
+
month: endInTimezone.month
|
|
19
|
+
});
|
|
20
|
+
const months = [];
|
|
21
|
+
let current = startYearMonth;
|
|
22
|
+
while (Temporal.PlainYearMonth.compare(current, endYearMonth) <= 0) {
|
|
23
|
+
const firstOfMonth = current.toPlainDate({ day: 1 });
|
|
24
|
+
months.push(
|
|
25
|
+
firstOfMonth.toZonedDateTime({
|
|
26
|
+
timeZone: timezone,
|
|
27
|
+
plainTime: new Temporal.PlainTime()
|
|
28
|
+
})
|
|
29
|
+
);
|
|
30
|
+
current = current.add({ months: 1 });
|
|
31
|
+
}
|
|
32
|
+
return months;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
eachMonthOfInterval
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=chunk-TNCLJK4Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachMonthOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each month within the interval.\n * Each element represents the first moment of the month (day 1 at midnight).\n * The interval is inclusive of both start and end months.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each month in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-15T10:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-04-20T14:00:00Z[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2025-01-01T00:00:00Z[UTC],\n * // 2025-02-01T00:00:00Z[UTC],\n * // 2025-03-01T00:00:00Z[UTC],\n * // 2025-04-01T00:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-year boundary\n * const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-02-15T00:00:00Z[UTC]');\n *\n * const months = eachMonthOfInterval({ start, end });\n * // [\n * // 2024-11-01T00:00:00Z[UTC],\n * // 2024-12-01T00:00:00Z[UTC],\n * // 2025-01-01T00:00:00Z[UTC],\n * // 2025-02-01T00:00:00Z[UTC]\n * // ]\n * ```\n */\nexport function eachMonthOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n\n // Get start of the starting month\n const startYearMonth = Temporal.PlainYearMonth.from({\n year: startZoned.year,\n month: startZoned.month,\n });\n\n // Get end month in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endYearMonth = Temporal.PlainYearMonth.from({\n year: endInTimezone.year,\n month: endInTimezone.month,\n });\n\n const months: Temporal.ZonedDateTime[] = [];\n let current = startYearMonth;\n\n while (Temporal.PlainYearMonth.compare(current, endYearMonth) <= 0) {\n const firstOfMonth = current.toPlainDate({ day: 1 });\n months.push(\n firstOfMonth.toZonedDateTime({\n timeZone: timezone,\n plainTime: new Temporal.PlainTime(),\n })\n );\n current = current.add({ months: 1 });\n }\n\n return months;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AA2ClB,SAAS,oBAAoB,UAGP;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAG5B,QAAM,iBAAiB,SAAS,eAAe,KAAK;AAAA,IAClD,MAAM,WAAW;AAAA,IACjB,OAAO,WAAW;AAAA,EACpB,CAAC;AAGD,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,eAAe,SAAS,eAAe,KAAK;AAAA,IAChD,MAAM,cAAc;AAAA,IACpB,OAAO,cAAc;AAAA,EACvB,CAAC;AAED,QAAM,SAAmC,CAAC;AAC1C,MAAI,UAAU;AAEd,SAAO,SAAS,eAAe,QAAQ,SAAS,YAAY,KAAK,GAAG;AAClE,UAAM,eAAe,QAAQ,YAAY,EAAE,KAAK,EAAE,CAAC;AACnD,WAAO;AAAA,MACL,aAAa,gBAAgB;AAAA,QAC3B,UAAU;AAAA,QACV,WAAW,IAAI,SAAS,UAAU;AAAA,MACpC,CAAC;AAAA,IACH;AACA,cAAU,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;AAAA,EACrC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
normalizeTemporalInput
|
|
3
|
+
} from "./chunk-MJSZNWCV.js";
|
|
4
|
+
|
|
5
|
+
// src/eachHourOfInterval.ts
|
|
6
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
7
|
+
function eachHourOfInterval(interval) {
|
|
8
|
+
const startZoned = normalizeTemporalInput(interval.start);
|
|
9
|
+
const endZoned = normalizeTemporalInput(interval.end);
|
|
10
|
+
const timezone = startZoned.timeZoneId;
|
|
11
|
+
const startHour = startZoned.round({ smallestUnit: "hour", roundingMode: "floor" });
|
|
12
|
+
const endInTimezone = endZoned.withTimeZone(timezone);
|
|
13
|
+
const endHour = endInTimezone.round({ smallestUnit: "hour", roundingMode: "floor" });
|
|
14
|
+
const hours = [];
|
|
15
|
+
let current = startHour;
|
|
16
|
+
while (Temporal.ZonedDateTime.compare(current, endHour) <= 0) {
|
|
17
|
+
hours.push(current);
|
|
18
|
+
current = current.add({ hours: 1 });
|
|
19
|
+
}
|
|
20
|
+
return hours;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
eachHourOfInterval
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=chunk-Y7CIJQ67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/eachHourOfInterval.ts"],"sourcesContent":["import { Temporal } from '@js-temporal/polyfill';\nimport { normalizeTemporalInput } from './shared/normalizeTemporalInput';\n\n/**\n * Returns an array of ZonedDateTime objects for each hour within the interval.\n * Each element represents the start of the hour (minute/second/etc. set to 0).\n * The interval is inclusive of both start and end hours.\n *\n * For Instant inputs, UTC is used as the timezone.\n * For ZonedDateTime inputs, the timezone of the start date is preserved.\n *\n * Note: During DST transitions, some hours may be skipped (spring forward) or\n * the array may contain fewer/more hours than expected based on wall-clock time.\n *\n * @param interval - The interval with start and end datetimes\n * @returns Array of ZonedDateTime at start of each hour in the interval\n *\n * @example\n * ```ts\n * const start = Temporal.ZonedDateTime.from('2025-01-06T10:30:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-06T14:15:00Z[UTC]');\n *\n * const hours = eachHourOfInterval({ start, end });\n * // [\n * // 2025-01-06T10:00:00Z[UTC],\n * // 2025-01-06T11:00:00Z[UTC],\n * // 2025-01-06T12:00:00Z[UTC],\n * // 2025-01-06T13:00:00Z[UTC],\n * // 2025-01-06T14:00:00Z[UTC]\n * // ]\n * ```\n *\n * @example\n * ```ts\n * // Cross-day boundary\n * const start = Temporal.ZonedDateTime.from('2025-01-06T22:00:00Z[UTC]');\n * const end = Temporal.ZonedDateTime.from('2025-01-07T02:00:00Z[UTC]');\n *\n * const hours = eachHourOfInterval({ start, end });\n * // [\n * // 2025-01-06T22:00:00Z[UTC],\n * // 2025-01-06T23:00:00Z[UTC],\n * // 2025-01-07T00:00:00Z[UTC],\n * // 2025-01-07T01:00:00Z[UTC],\n * // 2025-01-07T02:00:00Z[UTC]\n * // ]\n * ```\n */\nexport function eachHourOfInterval(interval: {\n start: Temporal.Instant | Temporal.ZonedDateTime;\n end: Temporal.Instant | Temporal.ZonedDateTime;\n}): Temporal.ZonedDateTime[] {\n const startZoned = normalizeTemporalInput(interval.start);\n const endZoned = normalizeTemporalInput(interval.end);\n\n const timezone = startZoned.timeZoneId;\n\n // Get start of the starting hour\n const startHour = startZoned.round({ smallestUnit: 'hour', roundingMode: 'floor' });\n\n // Get start of the ending hour in the same timezone\n const endInTimezone = endZoned.withTimeZone(timezone);\n const endHour = endInTimezone.round({ smallestUnit: 'hour', roundingMode: 'floor' });\n\n const hours: Temporal.ZonedDateTime[] = [];\n let current = startHour;\n\n while (Temporal.ZonedDateTime.compare(current, endHour) <= 0) {\n hours.push(current);\n current = current.add({ hours: 1 });\n }\n\n return hours;\n}\n"],"mappings":";;;;;AAAA,SAAS,gBAAgB;AAgDlB,SAAS,mBAAmB,UAGN;AAC3B,QAAM,aAAa,uBAAuB,SAAS,KAAK;AACxD,QAAM,WAAW,uBAAuB,SAAS,GAAG;AAEpD,QAAM,WAAW,WAAW;AAG5B,QAAM,YAAY,WAAW,MAAM,EAAE,cAAc,QAAQ,cAAc,QAAQ,CAAC;AAGlF,QAAM,gBAAgB,SAAS,aAAa,QAAQ;AACpD,QAAM,UAAU,cAAc,MAAM,EAAE,cAAc,QAAQ,cAAc,QAAQ,CAAC;AAEnF,QAAM,QAAkC,CAAC;AACzC,MAAI,UAAU;AAEd,SAAO,SAAS,cAAc,QAAQ,SAAS,OAAO,KAAK,GAAG;AAC5D,UAAM,KAAK,OAAO;AAClB,cAAU,QAAQ,IAAI,EAAE,OAAO,EAAE,CAAC;AAAA,EACpC;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each calendar day within the interval.
|
|
4
|
+
* Each element represents the start of day (midnight) in the timezone of the interval start.
|
|
5
|
+
* The interval is inclusive of both start and end days.
|
|
6
|
+
*
|
|
7
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
8
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
9
|
+
*
|
|
10
|
+
* @param interval - The interval with start and end datetimes
|
|
11
|
+
* @returns Array of ZonedDateTime at start of each day in the interval
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00Z[UTC]');
|
|
16
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-10T14:00:00Z[UTC]');
|
|
17
|
+
*
|
|
18
|
+
* const days = eachDayOfInterval({ start, end });
|
|
19
|
+
* // [
|
|
20
|
+
* // 2025-01-06T00:00:00Z[UTC],
|
|
21
|
+
* // 2025-01-07T00:00:00Z[UTC],
|
|
22
|
+
* // 2025-01-08T00:00:00Z[UTC],
|
|
23
|
+
* // 2025-01-09T00:00:00Z[UTC],
|
|
24
|
+
* // 2025-01-10T00:00:00Z[UTC]
|
|
25
|
+
* // ]
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // With timezone - preserves the timezone from start
|
|
31
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00-05:00[America/New_York]');
|
|
32
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-08T14:00:00-05:00[America/New_York]');
|
|
33
|
+
*
|
|
34
|
+
* const days = eachDayOfInterval({ start, end });
|
|
35
|
+
* // [
|
|
36
|
+
* // 2025-01-06T00:00:00-05:00[America/New_York],
|
|
37
|
+
* // 2025-01-07T00:00:00-05:00[America/New_York],
|
|
38
|
+
* // 2025-01-08T00:00:00-05:00[America/New_York]
|
|
39
|
+
* // ]
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* // With Instant (uses UTC)
|
|
45
|
+
* const start = Temporal.Instant.from('2025-01-06T00:00:00Z');
|
|
46
|
+
* const end = Temporal.Instant.from('2025-01-08T00:00:00Z');
|
|
47
|
+
*
|
|
48
|
+
* const days = eachDayOfInterval({ start, end });
|
|
49
|
+
* // [
|
|
50
|
+
* // 2025-01-06T00:00:00Z[UTC],
|
|
51
|
+
* // 2025-01-07T00:00:00Z[UTC],
|
|
52
|
+
* // 2025-01-08T00:00:00Z[UTC]
|
|
53
|
+
* // ]
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* // Single day interval
|
|
59
|
+
* const date = Temporal.ZonedDateTime.from('2025-01-15T12:00:00Z[UTC]');
|
|
60
|
+
*
|
|
61
|
+
* eachDayOfInterval({ start: date, end: date });
|
|
62
|
+
* // [2025-01-15T00:00:00Z[UTC]]
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare function eachDayOfInterval(interval: {
|
|
66
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
67
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
68
|
+
}): Temporal.ZonedDateTime[];
|
|
69
|
+
//# sourceMappingURL=eachDayOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachDayOfInterval.d.ts","sourceRoot":"","sources":["../src/eachDayOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE;IAC1C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAiB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachDayOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachDayOfInterval.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each hour within the interval.
|
|
4
|
+
* Each element represents the start of the hour (minute/second/etc. set to 0).
|
|
5
|
+
* The interval is inclusive of both start and end hours.
|
|
6
|
+
*
|
|
7
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
8
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
9
|
+
*
|
|
10
|
+
* Note: During DST transitions, some hours may be skipped (spring forward) or
|
|
11
|
+
* the array may contain fewer/more hours than expected based on wall-clock time.
|
|
12
|
+
*
|
|
13
|
+
* @param interval - The interval with start and end datetimes
|
|
14
|
+
* @returns Array of ZonedDateTime at start of each hour in the interval
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:30:00Z[UTC]');
|
|
19
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-06T14:15:00Z[UTC]');
|
|
20
|
+
*
|
|
21
|
+
* const hours = eachHourOfInterval({ start, end });
|
|
22
|
+
* // [
|
|
23
|
+
* // 2025-01-06T10:00:00Z[UTC],
|
|
24
|
+
* // 2025-01-06T11:00:00Z[UTC],
|
|
25
|
+
* // 2025-01-06T12:00:00Z[UTC],
|
|
26
|
+
* // 2025-01-06T13:00:00Z[UTC],
|
|
27
|
+
* // 2025-01-06T14:00:00Z[UTC]
|
|
28
|
+
* // ]
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* // Cross-day boundary
|
|
34
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T22:00:00Z[UTC]');
|
|
35
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-07T02:00:00Z[UTC]');
|
|
36
|
+
*
|
|
37
|
+
* const hours = eachHourOfInterval({ start, end });
|
|
38
|
+
* // [
|
|
39
|
+
* // 2025-01-06T22:00:00Z[UTC],
|
|
40
|
+
* // 2025-01-06T23:00:00Z[UTC],
|
|
41
|
+
* // 2025-01-07T00:00:00Z[UTC],
|
|
42
|
+
* // 2025-01-07T01:00:00Z[UTC],
|
|
43
|
+
* // 2025-01-07T02:00:00Z[UTC]
|
|
44
|
+
* // ]
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function eachHourOfInterval(interval: {
|
|
48
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
49
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
50
|
+
}): Temporal.ZonedDateTime[];
|
|
51
|
+
//# sourceMappingURL=eachHourOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachHourOfInterval.d.ts","sourceRoot":"","sources":["../src/eachHourOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAsB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachHourOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachHourOfInterval.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each minute within the interval.
|
|
4
|
+
* Each element represents the start of the minute (seconds/etc. set to 0).
|
|
5
|
+
* The interval is inclusive of both start and end minutes.
|
|
6
|
+
*
|
|
7
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
8
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
9
|
+
*
|
|
10
|
+
* Warning: Large intervals can produce very large arrays. For example, a 24-hour
|
|
11
|
+
* interval produces 1,441 elements. Consider whether this is appropriate for your use case.
|
|
12
|
+
*
|
|
13
|
+
* @param interval - The interval with start and end datetimes
|
|
14
|
+
* @returns Array of ZonedDateTime at start of each minute in the interval
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:30:00Z[UTC]');
|
|
19
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-06T10:33:45Z[UTC]');
|
|
20
|
+
*
|
|
21
|
+
* const minutes = eachMinuteOfInterval({ start, end });
|
|
22
|
+
* // [
|
|
23
|
+
* // 2025-01-06T10:30:00Z[UTC],
|
|
24
|
+
* // 2025-01-06T10:31:00Z[UTC],
|
|
25
|
+
* // 2025-01-06T10:32:00Z[UTC],
|
|
26
|
+
* // 2025-01-06T10:33:00Z[UTC]
|
|
27
|
+
* // ]
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* // Cross-hour boundary
|
|
33
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:58:00Z[UTC]');
|
|
34
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-06T11:02:00Z[UTC]');
|
|
35
|
+
*
|
|
36
|
+
* const minutes = eachMinuteOfInterval({ start, end });
|
|
37
|
+
* // [
|
|
38
|
+
* // 2025-01-06T10:58:00Z[UTC],
|
|
39
|
+
* // 2025-01-06T10:59:00Z[UTC],
|
|
40
|
+
* // 2025-01-06T11:00:00Z[UTC],
|
|
41
|
+
* // 2025-01-06T11:01:00Z[UTC],
|
|
42
|
+
* // 2025-01-06T11:02:00Z[UTC]
|
|
43
|
+
* // ]
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function eachMinuteOfInterval(interval: {
|
|
47
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
48
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
49
|
+
}): Temporal.ZonedDateTime[];
|
|
50
|
+
//# sourceMappingURL=eachMinuteOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachMinuteOfInterval.d.ts","sourceRoot":"","sources":["../src/eachMinuteOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE;IAC7C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAsB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachMinuteOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachMinuteOfInterval.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each month within the interval.
|
|
4
|
+
* Each element represents the first moment of the month (day 1 at midnight).
|
|
5
|
+
* The interval is inclusive of both start and end months.
|
|
6
|
+
*
|
|
7
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
8
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
9
|
+
*
|
|
10
|
+
* @param interval - The interval with start and end datetimes
|
|
11
|
+
* @returns Array of ZonedDateTime at start of each month in the interval
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-15T10:00:00Z[UTC]');
|
|
16
|
+
* const end = Temporal.ZonedDateTime.from('2025-04-20T14:00:00Z[UTC]');
|
|
17
|
+
*
|
|
18
|
+
* const months = eachMonthOfInterval({ start, end });
|
|
19
|
+
* // [
|
|
20
|
+
* // 2025-01-01T00:00:00Z[UTC],
|
|
21
|
+
* // 2025-02-01T00:00:00Z[UTC],
|
|
22
|
+
* // 2025-03-01T00:00:00Z[UTC],
|
|
23
|
+
* // 2025-04-01T00:00:00Z[UTC]
|
|
24
|
+
* // ]
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Cross-year boundary
|
|
30
|
+
* const start = Temporal.ZonedDateTime.from('2024-11-15T00:00:00Z[UTC]');
|
|
31
|
+
* const end = Temporal.ZonedDateTime.from('2025-02-15T00:00:00Z[UTC]');
|
|
32
|
+
*
|
|
33
|
+
* const months = eachMonthOfInterval({ start, end });
|
|
34
|
+
* // [
|
|
35
|
+
* // 2024-11-01T00:00:00Z[UTC],
|
|
36
|
+
* // 2024-12-01T00:00:00Z[UTC],
|
|
37
|
+
* // 2025-01-01T00:00:00Z[UTC],
|
|
38
|
+
* // 2025-02-01T00:00:00Z[UTC]
|
|
39
|
+
* // ]
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function eachMonthOfInterval(interval: {
|
|
43
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
44
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
45
|
+
}): Temporal.ZonedDateTime[];
|
|
46
|
+
//# sourceMappingURL=eachMonthOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachMonthOfInterval.d.ts","sourceRoot":"","sources":["../src/eachMonthOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAkC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachMonthOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachMonthOfInterval.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each week within the interval.
|
|
4
|
+
* Each element represents the first moment of the week (Monday at midnight).
|
|
5
|
+
* Uses ISO 8601 week definition: weeks start on Monday.
|
|
6
|
+
* The interval is inclusive of both start and end weeks.
|
|
7
|
+
*
|
|
8
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
9
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
10
|
+
*
|
|
11
|
+
* @param interval - The interval with start and end datetimes
|
|
12
|
+
* @returns Array of ZonedDateTime at start of each week (Monday) in the interval
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-06T10:00:00Z[UTC]'); // Monday
|
|
17
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-22T14:00:00Z[UTC]'); // Wednesday
|
|
18
|
+
*
|
|
19
|
+
* const weeks = eachWeekOfInterval({ start, end });
|
|
20
|
+
* // [
|
|
21
|
+
* // 2025-01-06T00:00:00Z[UTC], // Week 2
|
|
22
|
+
* // 2025-01-13T00:00:00Z[UTC], // Week 3
|
|
23
|
+
* // 2025-01-20T00:00:00Z[UTC] // Week 4
|
|
24
|
+
* // ]
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Mid-week start
|
|
30
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-08T10:00:00Z[UTC]'); // Wednesday
|
|
31
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-15T14:00:00Z[UTC]'); // Wednesday
|
|
32
|
+
*
|
|
33
|
+
* const weeks = eachWeekOfInterval({ start, end });
|
|
34
|
+
* // [
|
|
35
|
+
* // 2025-01-06T00:00:00Z[UTC], // Monday of week containing Jan 8
|
|
36
|
+
* // 2025-01-13T00:00:00Z[UTC] // Monday of week containing Jan 15
|
|
37
|
+
* // ]
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* // Cross-year boundary
|
|
43
|
+
* const start = Temporal.ZonedDateTime.from('2024-12-25T00:00:00Z[UTC]');
|
|
44
|
+
* const end = Temporal.ZonedDateTime.from('2025-01-08T00:00:00Z[UTC]');
|
|
45
|
+
*
|
|
46
|
+
* const weeks = eachWeekOfInterval({ start, end });
|
|
47
|
+
* // [
|
|
48
|
+
* // 2024-12-23T00:00:00Z[UTC], // Monday of week containing Dec 25
|
|
49
|
+
* // 2024-12-30T00:00:00Z[UTC], // Monday of week containing Dec 30
|
|
50
|
+
* // 2025-01-06T00:00:00Z[UTC] // Monday of week containing Jan 8
|
|
51
|
+
* // ]
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function eachWeekOfInterval(interval: {
|
|
55
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
56
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
57
|
+
}): Temporal.ZonedDateTime[];
|
|
58
|
+
//# sourceMappingURL=eachWeekOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachWeekOfInterval.d.ts","sourceRoot":"","sources":["../src/eachWeekOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAyB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachWeekOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachWeekOfInterval.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Temporal } from '@js-temporal/polyfill';
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array of ZonedDateTime objects for each year within the interval.
|
|
4
|
+
* Each element represents the first moment of the year (January 1st at midnight).
|
|
5
|
+
* The interval is inclusive of both start and end years.
|
|
6
|
+
*
|
|
7
|
+
* For Instant inputs, UTC is used as the timezone.
|
|
8
|
+
* For ZonedDateTime inputs, the timezone of the start date is preserved.
|
|
9
|
+
*
|
|
10
|
+
* @param interval - The interval with start and end datetimes
|
|
11
|
+
* @returns Array of ZonedDateTime at start of each year in the interval
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const start = Temporal.ZonedDateTime.from('2022-06-15T10:00:00Z[UTC]');
|
|
16
|
+
* const end = Temporal.ZonedDateTime.from('2025-03-20T14:00:00Z[UTC]');
|
|
17
|
+
*
|
|
18
|
+
* const years = eachYearOfInterval({ start, end });
|
|
19
|
+
* // [
|
|
20
|
+
* // 2022-01-01T00:00:00Z[UTC],
|
|
21
|
+
* // 2023-01-01T00:00:00Z[UTC],
|
|
22
|
+
* // 2024-01-01T00:00:00Z[UTC],
|
|
23
|
+
* // 2025-01-01T00:00:00Z[UTC]
|
|
24
|
+
* // ]
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // Single year
|
|
30
|
+
* const start = Temporal.ZonedDateTime.from('2025-01-15T00:00:00Z[UTC]');
|
|
31
|
+
* const end = Temporal.ZonedDateTime.from('2025-12-31T23:59:59Z[UTC]');
|
|
32
|
+
*
|
|
33
|
+
* const years = eachYearOfInterval({ start, end });
|
|
34
|
+
* // [2025-01-01T00:00:00Z[UTC]]
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // With timezone
|
|
40
|
+
* const start = Temporal.ZonedDateTime.from('2024-01-01T00:00:00-05:00[America/New_York]');
|
|
41
|
+
* const end = Temporal.ZonedDateTime.from('2026-06-15T00:00:00-04:00[America/New_York]');
|
|
42
|
+
*
|
|
43
|
+
* const years = eachYearOfInterval({ start, end });
|
|
44
|
+
* // [
|
|
45
|
+
* // 2024-01-01T00:00:00-05:00[America/New_York],
|
|
46
|
+
* // 2025-01-01T00:00:00-05:00[America/New_York],
|
|
47
|
+
* // 2026-01-01T00:00:00-05:00[America/New_York]
|
|
48
|
+
* // ]
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function eachYearOfInterval(interval: {
|
|
52
|
+
start: Temporal.Instant | Temporal.ZonedDateTime;
|
|
53
|
+
end: Temporal.Instant | Temporal.ZonedDateTime;
|
|
54
|
+
}): Temporal.ZonedDateTime[];
|
|
55
|
+
//# sourceMappingURL=eachYearOfInterval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachYearOfInterval.d.ts","sourceRoot":"","sources":["../src/eachYearOfInterval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;IACjD,GAAG,EAAE,QAAQ,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC;CAChD,GAAG,QAAQ,CAAC,aAAa,EAAE,CAwB3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eachYearOfInterval.test.d.ts","sourceRoot":"","sources":["../src/eachYearOfInterval.test.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,12 @@ export { endOfYear } from './endOfYear';
|
|
|
43
43
|
export { isBefore } from './isBefore';
|
|
44
44
|
export { isAfter } from './isAfter';
|
|
45
45
|
export { isWithinInterval } from './isWithinInterval';
|
|
46
|
+
export { eachDayOfInterval } from './eachDayOfInterval';
|
|
47
|
+
export { eachHourOfInterval } from './eachHourOfInterval';
|
|
48
|
+
export { eachMinuteOfInterval } from './eachMinuteOfInterval';
|
|
49
|
+
export { eachMonthOfInterval } from './eachMonthOfInterval';
|
|
50
|
+
export { eachWeekOfInterval } from './eachWeekOfInterval';
|
|
51
|
+
export { eachYearOfInterval } from './eachYearOfInterval';
|
|
46
52
|
export { isFuture } from './isFuture';
|
|
47
53
|
export { isPast } from './isPast';
|
|
48
54
|
export { isSameDay } from './isSameDay';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5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,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
toIso9075
|
|
3
|
-
} from "./chunk-DFLGGK4F.js";
|
|
4
|
-
import {
|
|
5
|
-
toPlainDate
|
|
6
|
-
} from "./chunk-HFQUXON5.js";
|
|
7
1
|
import {
|
|
8
2
|
toPlainTime
|
|
9
3
|
} from "./chunk-UJWM2BV2.js";
|
|
@@ -16,12 +10,6 @@ import {
|
|
|
16
10
|
import {
|
|
17
11
|
today
|
|
18
12
|
} from "./chunk-KZB6NERH.js";
|
|
19
|
-
import {
|
|
20
|
-
subMonths
|
|
21
|
-
} from "./chunk-52NEOY34.js";
|
|
22
|
-
import {
|
|
23
|
-
subNanoseconds
|
|
24
|
-
} from "./chunk-WVHAYLBW.js";
|
|
25
13
|
import {
|
|
26
14
|
subSeconds
|
|
27
15
|
} from "./chunk-BH2YB4MV.js";
|
|
@@ -38,11 +26,11 @@ import {
|
|
|
38
26
|
toIso
|
|
39
27
|
} from "./chunk-BSV32PSO.js";
|
|
40
28
|
import {
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
29
|
+
toIso9075
|
|
30
|
+
} from "./chunk-DFLGGK4F.js";
|
|
43
31
|
import {
|
|
44
|
-
|
|
45
|
-
} from "./chunk-
|
|
32
|
+
toPlainDate
|
|
33
|
+
} from "./chunk-HFQUXON5.js";
|
|
46
34
|
import {
|
|
47
35
|
startOfYear
|
|
48
36
|
} from "./chunk-3TSFIPUR.js";
|
|
@@ -62,11 +50,11 @@ import {
|
|
|
62
50
|
subMinutes
|
|
63
51
|
} from "./chunk-J6G2I2TU.js";
|
|
64
52
|
import {
|
|
65
|
-
|
|
66
|
-
} from "./chunk-
|
|
53
|
+
subMonths
|
|
54
|
+
} from "./chunk-52NEOY34.js";
|
|
67
55
|
import {
|
|
68
|
-
|
|
69
|
-
} from "./chunk-
|
|
56
|
+
subNanoseconds
|
|
57
|
+
} from "./chunk-WVHAYLBW.js";
|
|
70
58
|
import {
|
|
71
59
|
now
|
|
72
60
|
} from "./chunk-FSD3DDFC.js";
|
|
@@ -86,11 +74,11 @@ import {
|
|
|
86
74
|
startOfDay
|
|
87
75
|
} from "./chunk-YIT6EMBC.js";
|
|
88
76
|
import {
|
|
89
|
-
|
|
90
|
-
} from "./chunk-
|
|
77
|
+
startOfMonth
|
|
78
|
+
} from "./chunk-HLGMUTFK.js";
|
|
91
79
|
import {
|
|
92
|
-
|
|
93
|
-
} from "./chunk-
|
|
80
|
+
startOfWeek
|
|
81
|
+
} from "./chunk-EZ7NVTZI.js";
|
|
94
82
|
import {
|
|
95
83
|
isSameMillisecond
|
|
96
84
|
} from "./chunk-ISHZRFVN.js";
|
|
@@ -110,11 +98,11 @@ import {
|
|
|
110
98
|
isSameWeek
|
|
111
99
|
} from "./chunk-JOD4ATPE.js";
|
|
112
100
|
import {
|
|
113
|
-
|
|
114
|
-
} from "./chunk-
|
|
101
|
+
isSameYear
|
|
102
|
+
} from "./chunk-VLZ3HQQA.js";
|
|
115
103
|
import {
|
|
116
|
-
|
|
117
|
-
} from "./chunk-
|
|
104
|
+
isWithinInterval
|
|
105
|
+
} from "./chunk-5C3TQSWA.js";
|
|
118
106
|
import {
|
|
119
107
|
isPlainDateBefore
|
|
120
108
|
} from "./chunk-4E7OGJ3F.js";
|
|
@@ -134,11 +122,11 @@ import {
|
|
|
134
122
|
isSameDay
|
|
135
123
|
} from "./chunk-RW3C2677.js";
|
|
136
124
|
import {
|
|
137
|
-
|
|
138
|
-
} from "./chunk-
|
|
125
|
+
isSameHour
|
|
126
|
+
} from "./chunk-EEQ3REET.js";
|
|
139
127
|
import {
|
|
140
|
-
|
|
141
|
-
} from "./chunk-
|
|
128
|
+
isSameMicrosecond
|
|
129
|
+
} from "./chunk-PPB62JYV.js";
|
|
142
130
|
import {
|
|
143
131
|
formatPlainDate
|
|
144
132
|
} from "./chunk-3A6X6WV5.js";
|
|
@@ -151,12 +139,45 @@ import {
|
|
|
151
139
|
import {
|
|
152
140
|
isBefore
|
|
153
141
|
} from "./chunk-ZDA7GSWU.js";
|
|
154
|
-
import "./chunk-WUAIUEH7.js";
|
|
155
142
|
import {
|
|
156
143
|
isFuture
|
|
157
|
-
} from "./chunk-
|
|
158
|
-
import "./chunk-QFNGYTTH.js";
|
|
144
|
+
} from "./chunk-JA7SVLAF.js";
|
|
159
145
|
import "./chunk-WY63VEXE.js";
|
|
146
|
+
import {
|
|
147
|
+
isPast
|
|
148
|
+
} from "./chunk-UBY22QWM.js";
|
|
149
|
+
import "./chunk-WUAIUEH7.js";
|
|
150
|
+
import "./chunk-QFNGYTTH.js";
|
|
151
|
+
import {
|
|
152
|
+
isPlainDateAfter
|
|
153
|
+
} from "./chunk-BPZ7BRJW.js";
|
|
154
|
+
import {
|
|
155
|
+
eachMonthOfInterval
|
|
156
|
+
} from "./chunk-TNCLJK4Y.js";
|
|
157
|
+
import {
|
|
158
|
+
eachWeekOfInterval
|
|
159
|
+
} from "./chunk-OLEOU3XE.js";
|
|
160
|
+
import {
|
|
161
|
+
eachYearOfInterval
|
|
162
|
+
} from "./chunk-BUX26GTD.js";
|
|
163
|
+
import {
|
|
164
|
+
endOfDay
|
|
165
|
+
} from "./chunk-HOCNCQTC.js";
|
|
166
|
+
import {
|
|
167
|
+
endOfMonth
|
|
168
|
+
} from "./chunk-OQ4CWKJT.js";
|
|
169
|
+
import {
|
|
170
|
+
endOfWeek
|
|
171
|
+
} from "./chunk-X26WIJ6L.js";
|
|
172
|
+
import {
|
|
173
|
+
endOfYear
|
|
174
|
+
} from "./chunk-776JOVV6.js";
|
|
175
|
+
import "./chunk-KGVUENQO.js";
|
|
176
|
+
import "./chunk-AVGNRINZ.js";
|
|
177
|
+
import "./chunk-JNA3AFOC.js";
|
|
178
|
+
import {
|
|
179
|
+
format
|
|
180
|
+
} from "./chunk-ZC6KWXCW.js";
|
|
160
181
|
import {
|
|
161
182
|
differenceInMonths
|
|
162
183
|
} from "./chunk-BIAPE4MR.js";
|
|
@@ -173,17 +194,14 @@ import {
|
|
|
173
194
|
differenceInYears
|
|
174
195
|
} from "./chunk-CHW2EN2O.js";
|
|
175
196
|
import {
|
|
176
|
-
|
|
177
|
-
} from "./chunk-
|
|
197
|
+
eachDayOfInterval
|
|
198
|
+
} from "./chunk-DKYVFYWM.js";
|
|
178
199
|
import {
|
|
179
|
-
|
|
180
|
-
} from "./chunk-
|
|
181
|
-
import "./chunk-KGVUENQO.js";
|
|
200
|
+
eachHourOfInterval
|
|
201
|
+
} from "./chunk-Y7CIJQ67.js";
|
|
182
202
|
import {
|
|
183
|
-
|
|
184
|
-
} from "./chunk-
|
|
185
|
-
import "./chunk-AVGNRINZ.js";
|
|
186
|
-
import "./chunk-JNA3AFOC.js";
|
|
203
|
+
eachMinuteOfInterval
|
|
204
|
+
} from "./chunk-G2JUEBC5.js";
|
|
187
205
|
import {
|
|
188
206
|
addWeeks
|
|
189
207
|
} from "./chunk-DT2EWLHU.js";
|
|
@@ -256,6 +274,12 @@ export {
|
|
|
256
274
|
differenceInSeconds,
|
|
257
275
|
differenceInWeeks,
|
|
258
276
|
differenceInYears,
|
|
277
|
+
eachDayOfInterval,
|
|
278
|
+
eachHourOfInterval,
|
|
279
|
+
eachMinuteOfInterval,
|
|
280
|
+
eachMonthOfInterval,
|
|
281
|
+
eachWeekOfInterval,
|
|
282
|
+
eachYearOfInterval,
|
|
259
283
|
endOfDay,
|
|
260
284
|
endOfMonth,
|
|
261
285
|
endOfWeek,
|
package/dist/isFuture.js
CHANGED
package/dist/isWithinInterval.js
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|