rrule-temporal 1.4.2 → 1.4.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-EHMOE4GK.js → chunk-BN57WTKY.js} +9 -4
- package/dist/index.cjs +9 -4
- package/dist/index.js +1 -1
- package/dist/totext.cjs +9 -4
- package/dist/totext.js +1 -1
- package/package.json +1 -1
|
@@ -1527,7 +1527,11 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1527
1527
|
default:
|
|
1528
1528
|
unit = "seconds";
|
|
1529
1529
|
}
|
|
1530
|
-
const
|
|
1530
|
+
const dtstartNormalized = Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1531
|
+
const alignedNormalized = Temporal.ZonedDateTime.from(
|
|
1532
|
+
aligned.withPlainTime(this.originalDtstart.toPlainTime()).toString()
|
|
1533
|
+
).withTimeZone(dtstartNormalized.timeZoneId);
|
|
1534
|
+
const diffDur = dtstartNormalized.until(alignedNormalized, { largestUnit: unit });
|
|
1531
1535
|
const unitsBetween = diffDur[unit];
|
|
1532
1536
|
const steps = Math.floor(unitsBetween / interval);
|
|
1533
1537
|
let toAdd;
|
|
@@ -1554,9 +1558,10 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1554
1558
|
default:
|
|
1555
1559
|
toAdd = { seconds: jump };
|
|
1556
1560
|
}
|
|
1557
|
-
let candidate = this.opts.dtstart.add(toAdd);
|
|
1558
|
-
|
|
1559
|
-
|
|
1561
|
+
let candidate = Temporal.ZonedDateTime.from(this.opts.dtstart.add(toAdd).toString());
|
|
1562
|
+
const dtstartForCompare = Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1563
|
+
if (Temporal.ZonedDateTime.compare(candidate, dtstartForCompare) < 0) {
|
|
1564
|
+
candidate = dtstartForCompare;
|
|
1560
1565
|
}
|
|
1561
1566
|
tempOpts.dtstart = candidate;
|
|
1562
1567
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1548,7 +1548,11 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1548
1548
|
default:
|
|
1549
1549
|
unit = "seconds";
|
|
1550
1550
|
}
|
|
1551
|
-
const
|
|
1551
|
+
const dtstartNormalized = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1552
|
+
const alignedNormalized = import_polyfill.Temporal.ZonedDateTime.from(
|
|
1553
|
+
aligned.withPlainTime(this.originalDtstart.toPlainTime()).toString()
|
|
1554
|
+
).withTimeZone(dtstartNormalized.timeZoneId);
|
|
1555
|
+
const diffDur = dtstartNormalized.until(alignedNormalized, { largestUnit: unit });
|
|
1552
1556
|
const unitsBetween = diffDur[unit];
|
|
1553
1557
|
const steps = Math.floor(unitsBetween / interval);
|
|
1554
1558
|
let toAdd;
|
|
@@ -1575,9 +1579,10 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1575
1579
|
default:
|
|
1576
1580
|
toAdd = { seconds: jump };
|
|
1577
1581
|
}
|
|
1578
|
-
let candidate = this.opts.dtstart.add(toAdd);
|
|
1579
|
-
|
|
1580
|
-
|
|
1582
|
+
let candidate = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.add(toAdd).toString());
|
|
1583
|
+
const dtstartForCompare = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1584
|
+
if (import_polyfill.Temporal.ZonedDateTime.compare(candidate, dtstartForCompare) < 0) {
|
|
1585
|
+
candidate = dtstartForCompare;
|
|
1581
1586
|
}
|
|
1582
1587
|
tempOpts.dtstart = candidate;
|
|
1583
1588
|
}
|
package/dist/index.js
CHANGED
package/dist/totext.cjs
CHANGED
|
@@ -1550,7 +1550,11 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1550
1550
|
default:
|
|
1551
1551
|
unit = "seconds";
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const dtstartNormalized = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1554
|
+
const alignedNormalized = import_polyfill.Temporal.ZonedDateTime.from(
|
|
1555
|
+
aligned.withPlainTime(this.originalDtstart.toPlainTime()).toString()
|
|
1556
|
+
).withTimeZone(dtstartNormalized.timeZoneId);
|
|
1557
|
+
const diffDur = dtstartNormalized.until(alignedNormalized, { largestUnit: unit });
|
|
1554
1558
|
const unitsBetween = diffDur[unit];
|
|
1555
1559
|
const steps = Math.floor(unitsBetween / interval);
|
|
1556
1560
|
let toAdd;
|
|
@@ -1577,9 +1581,10 @@ var _RRuleTemporal = class _RRuleTemporal {
|
|
|
1577
1581
|
default:
|
|
1578
1582
|
toAdd = { seconds: jump };
|
|
1579
1583
|
}
|
|
1580
|
-
let candidate = this.opts.dtstart.add(toAdd);
|
|
1581
|
-
|
|
1582
|
-
|
|
1584
|
+
let candidate = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.add(toAdd).toString());
|
|
1585
|
+
const dtstartForCompare = import_polyfill.Temporal.ZonedDateTime.from(this.opts.dtstart.toString());
|
|
1586
|
+
if (import_polyfill.Temporal.ZonedDateTime.compare(candidate, dtstartForCompare) < 0) {
|
|
1587
|
+
candidate = dtstartForCompare;
|
|
1583
1588
|
}
|
|
1584
1589
|
tempOpts.dtstart = candidate;
|
|
1585
1590
|
}
|
package/dist/totext.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rrule-temporal",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
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",
|