rrule-temporal 1.2.6 → 1.2.7
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-UCJETDYT.js → chunk-SWKVAJTZ.js} +16 -12
- package/dist/index.cjs +16 -12
- package/dist/index.js +1 -1
- package/dist/totext.cjs +16 -12
- package/dist/totext.js +1 -1
- package/package.json +1 -1
|
@@ -1298,18 +1298,20 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1298
1298
|
applyCountLimitAndMergeRDates(dates, iterator) {
|
|
1299
1299
|
const merged = this.mergeAndDeduplicateRDates(dates);
|
|
1300
1300
|
const excluded = this.excludeExDates(merged);
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1301
|
+
const hasCountLimit = this.opts.count !== void 0;
|
|
1302
|
+
if (!hasCountLimit && !iterator) {
|
|
1303
|
+
return excluded;
|
|
1304
|
+
}
|
|
1305
|
+
let emitted = 0;
|
|
1306
|
+
const max = hasCountLimit ? this.opts.count : Infinity;
|
|
1307
|
+
const finalDates = [];
|
|
1308
|
+
for (const d of excluded) {
|
|
1309
|
+
if (emitted >= max) break;
|
|
1310
|
+
if (iterator && !iterator(d, emitted)) break;
|
|
1311
|
+
finalDates.push(d);
|
|
1312
|
+
emitted++;
|
|
1311
1313
|
}
|
|
1312
|
-
return
|
|
1314
|
+
return finalDates;
|
|
1313
1315
|
}
|
|
1314
1316
|
/**
|
|
1315
1317
|
* Checks if the count limit should break the loop based on rDate presence.
|
|
@@ -1424,7 +1426,9 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1424
1426
|
const inst = occ.toInstant();
|
|
1425
1427
|
const ok = inc ? Temporal.Instant.compare(inst, afterInst) >= 0 : Temporal.Instant.compare(inst, afterInst) > 0;
|
|
1426
1428
|
if (ok) {
|
|
1427
|
-
result
|
|
1429
|
+
if (!result || Temporal.ZonedDateTime.compare(occ, result) < 0) {
|
|
1430
|
+
result = occ;
|
|
1431
|
+
}
|
|
1428
1432
|
return false;
|
|
1429
1433
|
}
|
|
1430
1434
|
return true;
|
package/dist/index.cjs
CHANGED
|
@@ -1319,18 +1319,20 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1319
1319
|
applyCountLimitAndMergeRDates(dates, iterator) {
|
|
1320
1320
|
const merged = this.mergeAndDeduplicateRDates(dates);
|
|
1321
1321
|
const excluded = this.excludeExDates(merged);
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1322
|
+
const hasCountLimit = this.opts.count !== void 0;
|
|
1323
|
+
if (!hasCountLimit && !iterator) {
|
|
1324
|
+
return excluded;
|
|
1325
|
+
}
|
|
1326
|
+
let emitted = 0;
|
|
1327
|
+
const max = hasCountLimit ? this.opts.count : Infinity;
|
|
1328
|
+
const finalDates = [];
|
|
1329
|
+
for (const d of excluded) {
|
|
1330
|
+
if (emitted >= max) break;
|
|
1331
|
+
if (iterator && !iterator(d, emitted)) break;
|
|
1332
|
+
finalDates.push(d);
|
|
1333
|
+
emitted++;
|
|
1332
1334
|
}
|
|
1333
|
-
return
|
|
1335
|
+
return finalDates;
|
|
1334
1336
|
}
|
|
1335
1337
|
/**
|
|
1336
1338
|
* Checks if the count limit should break the loop based on rDate presence.
|
|
@@ -1445,7 +1447,9 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1445
1447
|
const inst = occ.toInstant();
|
|
1446
1448
|
const ok = inc ? import_polyfill.Temporal.Instant.compare(inst, afterInst) >= 0 : import_polyfill.Temporal.Instant.compare(inst, afterInst) > 0;
|
|
1447
1449
|
if (ok) {
|
|
1448
|
-
result
|
|
1450
|
+
if (!result || import_polyfill.Temporal.ZonedDateTime.compare(occ, result) < 0) {
|
|
1451
|
+
result = occ;
|
|
1452
|
+
}
|
|
1449
1453
|
return false;
|
|
1450
1454
|
}
|
|
1451
1455
|
return true;
|
package/dist/index.js
CHANGED
package/dist/totext.cjs
CHANGED
|
@@ -1321,18 +1321,20 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1321
1321
|
applyCountLimitAndMergeRDates(dates, iterator) {
|
|
1322
1322
|
const merged = this.mergeAndDeduplicateRDates(dates);
|
|
1323
1323
|
const excluded = this.excludeExDates(merged);
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1324
|
+
const hasCountLimit = this.opts.count !== void 0;
|
|
1325
|
+
if (!hasCountLimit && !iterator) {
|
|
1326
|
+
return excluded;
|
|
1327
|
+
}
|
|
1328
|
+
let emitted = 0;
|
|
1329
|
+
const max = hasCountLimit ? this.opts.count : Infinity;
|
|
1330
|
+
const finalDates = [];
|
|
1331
|
+
for (const d of excluded) {
|
|
1332
|
+
if (emitted >= max) break;
|
|
1333
|
+
if (iterator && !iterator(d, emitted)) break;
|
|
1334
|
+
finalDates.push(d);
|
|
1335
|
+
emitted++;
|
|
1334
1336
|
}
|
|
1335
|
-
return
|
|
1337
|
+
return finalDates;
|
|
1336
1338
|
}
|
|
1337
1339
|
/**
|
|
1338
1340
|
* Checks if the count limit should break the loop based on rDate presence.
|
|
@@ -1447,7 +1449,9 @@ var RRuleTemporal = class _RRuleTemporal {
|
|
|
1447
1449
|
const inst = occ.toInstant();
|
|
1448
1450
|
const ok = inc ? import_polyfill.Temporal.Instant.compare(inst, afterInst) >= 0 : import_polyfill.Temporal.Instant.compare(inst, afterInst) > 0;
|
|
1449
1451
|
if (ok) {
|
|
1450
|
-
result
|
|
1452
|
+
if (!result || import_polyfill.Temporal.ZonedDateTime.compare(occ, result) < 0) {
|
|
1453
|
+
result = occ;
|
|
1454
|
+
}
|
|
1451
1455
|
return false;
|
|
1452
1456
|
}
|
|
1453
1457
|
return true;
|
package/dist/totext.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rrule-temporal",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "Recurrence rule (rrule) processing using Temporal PlainDate/PlainDateTime, with cross-timezone and cross-calendar rrule support",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|