rrule-temporal 1.1.9 → 1.1.11

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.
@@ -1,4 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
2
4
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
4
6
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
14
16
  }
15
17
  return a;
16
18
  };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
17
20
 
18
21
  // src/index.ts
19
22
  import { Temporal } from "@js-temporal/polyfill";
@@ -149,7 +152,11 @@ var RRuleTemporal = class _RRuleTemporal {
149
152
  const parsed = parseRRuleString(params.rruleString, params.tzid);
150
153
  this.tzid = (_b = (_a = parsed.tzid) != null ? _a : params.tzid) != null ? _b : "UTC";
151
154
  this.originalDtstart = parsed.dtstart;
152
- manual = __spreadValues(__spreadValues({}, params), parsed);
155
+ manual = __spreadProps(__spreadValues({}, parsed), {
156
+ maxIterations: params.maxIterations,
157
+ includeDtstart: params.includeDtstart,
158
+ tzid: this.tzid
159
+ });
153
160
  } else {
154
161
  manual = __spreadValues({}, params);
155
162
  if (typeof manual.dtstart === "string") {
@@ -1212,30 +1219,29 @@ var RRuleTemporal = class _RRuleTemporal {
1212
1219
  if (!tempOpts.until || Temporal.ZonedDateTime.compare(beforeZdt, tempOpts.until) < 0) {
1213
1220
  tempOpts.until = beforeZdt;
1214
1221
  }
1215
- if (tempOpts.count === void 0) {
1216
- const interval = (_a = tempOpts.interval) != null ? _a : 1;
1222
+ if (tempOpts.count === void 0 && ((_a = tempOpts.interval) != null ? _a : 1) === 1) {
1217
1223
  let duration;
1218
1224
  switch (tempOpts.freq) {
1219
1225
  case "YEARLY":
1220
- duration = { years: interval };
1226
+ duration = { years: 1 };
1221
1227
  break;
1222
1228
  case "MONTHLY":
1223
- duration = { months: interval };
1229
+ duration = { months: 1 };
1224
1230
  break;
1225
1231
  case "WEEKLY":
1226
- duration = { weeks: interval };
1232
+ duration = { weeks: 1 };
1227
1233
  break;
1228
1234
  case "DAILY":
1229
- duration = { days: interval };
1235
+ duration = { days: 1 };
1230
1236
  break;
1231
1237
  case "HOURLY":
1232
- duration = { hours: interval };
1238
+ duration = { hours: 1 };
1233
1239
  break;
1234
1240
  case "MINUTELY":
1235
- duration = { minutes: interval };
1241
+ duration = { minutes: 1 };
1236
1242
  break;
1237
1243
  default:
1238
- duration = { seconds: interval };
1244
+ duration = { seconds: 1 };
1239
1245
  }
1240
1246
  const aligned = startZdt.withPlainTime(this.originalDtstart.toPlainTime());
1241
1247
  const candidate = aligned.subtract(duration);
package/dist/index.cjs CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -17,6 +19,7 @@ var __spreadValues = (a, b) => {
17
19
  }
18
20
  return a;
19
21
  };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
23
  var __export = (target, all) => {
21
24
  for (var name in all)
22
25
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -170,7 +173,11 @@ var RRuleTemporal = class _RRuleTemporal {
170
173
  const parsed = parseRRuleString(params.rruleString, params.tzid);
171
174
  this.tzid = (_b = (_a = parsed.tzid) != null ? _a : params.tzid) != null ? _b : "UTC";
172
175
  this.originalDtstart = parsed.dtstart;
173
- manual = __spreadValues(__spreadValues({}, params), parsed);
176
+ manual = __spreadProps(__spreadValues({}, parsed), {
177
+ maxIterations: params.maxIterations,
178
+ includeDtstart: params.includeDtstart,
179
+ tzid: this.tzid
180
+ });
174
181
  } else {
175
182
  manual = __spreadValues({}, params);
176
183
  if (typeof manual.dtstart === "string") {
@@ -1233,30 +1240,29 @@ var RRuleTemporal = class _RRuleTemporal {
1233
1240
  if (!tempOpts.until || import_polyfill.Temporal.ZonedDateTime.compare(beforeZdt, tempOpts.until) < 0) {
1234
1241
  tempOpts.until = beforeZdt;
1235
1242
  }
1236
- if (tempOpts.count === void 0) {
1237
- const interval = (_a = tempOpts.interval) != null ? _a : 1;
1243
+ if (tempOpts.count === void 0 && ((_a = tempOpts.interval) != null ? _a : 1) === 1) {
1238
1244
  let duration;
1239
1245
  switch (tempOpts.freq) {
1240
1246
  case "YEARLY":
1241
- duration = { years: interval };
1247
+ duration = { years: 1 };
1242
1248
  break;
1243
1249
  case "MONTHLY":
1244
- duration = { months: interval };
1250
+ duration = { months: 1 };
1245
1251
  break;
1246
1252
  case "WEEKLY":
1247
- duration = { weeks: interval };
1253
+ duration = { weeks: 1 };
1248
1254
  break;
1249
1255
  case "DAILY":
1250
- duration = { days: interval };
1256
+ duration = { days: 1 };
1251
1257
  break;
1252
1258
  case "HOURLY":
1253
- duration = { hours: interval };
1259
+ duration = { hours: 1 };
1254
1260
  break;
1255
1261
  case "MINUTELY":
1256
- duration = { minutes: interval };
1262
+ duration = { minutes: 1 };
1257
1263
  break;
1258
1264
  default:
1259
- duration = { seconds: interval };
1265
+ duration = { seconds: 1 };
1260
1266
  }
1261
1267
  const aligned = startZdt.withPlainTime(this.originalDtstart.toPlainTime());
1262
1268
  const candidate = aligned.subtract(duration);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RRuleTemporal
3
- } from "./chunk-EPQ2H4J3.js";
3
+ } from "./chunk-UBRMPYIL.js";
4
4
  export {
5
5
  RRuleTemporal
6
6
  };
package/dist/totext.cjs CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -17,6 +19,7 @@ var __spreadValues = (a, b) => {
17
19
  }
18
20
  return a;
19
21
  };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
23
  var __export = (target, all) => {
21
24
  for (var name in all)
22
25
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -172,7 +175,11 @@ var RRuleTemporal = class _RRuleTemporal {
172
175
  const parsed = parseRRuleString(params.rruleString, params.tzid);
173
176
  this.tzid = (_b = (_a = parsed.tzid) != null ? _a : params.tzid) != null ? _b : "UTC";
174
177
  this.originalDtstart = parsed.dtstart;
175
- manual = __spreadValues(__spreadValues({}, params), parsed);
178
+ manual = __spreadProps(__spreadValues({}, parsed), {
179
+ maxIterations: params.maxIterations,
180
+ includeDtstart: params.includeDtstart,
181
+ tzid: this.tzid
182
+ });
176
183
  } else {
177
184
  manual = __spreadValues({}, params);
178
185
  if (typeof manual.dtstart === "string") {
@@ -1235,30 +1242,29 @@ var RRuleTemporal = class _RRuleTemporal {
1235
1242
  if (!tempOpts.until || import_polyfill.Temporal.ZonedDateTime.compare(beforeZdt, tempOpts.until) < 0) {
1236
1243
  tempOpts.until = beforeZdt;
1237
1244
  }
1238
- if (tempOpts.count === void 0) {
1239
- const interval = (_a = tempOpts.interval) != null ? _a : 1;
1245
+ if (tempOpts.count === void 0 && ((_a = tempOpts.interval) != null ? _a : 1) === 1) {
1240
1246
  let duration;
1241
1247
  switch (tempOpts.freq) {
1242
1248
  case "YEARLY":
1243
- duration = { years: interval };
1249
+ duration = { years: 1 };
1244
1250
  break;
1245
1251
  case "MONTHLY":
1246
- duration = { months: interval };
1252
+ duration = { months: 1 };
1247
1253
  break;
1248
1254
  case "WEEKLY":
1249
- duration = { weeks: interval };
1255
+ duration = { weeks: 1 };
1250
1256
  break;
1251
1257
  case "DAILY":
1252
- duration = { days: interval };
1258
+ duration = { days: 1 };
1253
1259
  break;
1254
1260
  case "HOURLY":
1255
- duration = { hours: interval };
1261
+ duration = { hours: 1 };
1256
1262
  break;
1257
1263
  case "MINUTELY":
1258
- duration = { minutes: interval };
1264
+ duration = { minutes: 1 };
1259
1265
  break;
1260
1266
  default:
1261
- duration = { seconds: interval };
1267
+ duration = { seconds: 1 };
1262
1268
  }
1263
1269
  const aligned = startZdt.withPlainTime(this.originalDtstart.toPlainTime());
1264
1270
  const candidate = aligned.subtract(duration);
package/dist/totext.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RRuleTemporal
3
- } from "./chunk-EPQ2H4J3.js";
3
+ } from "./chunk-UBRMPYIL.js";
4
4
 
5
5
  // src/totext.ts
6
6
  var en = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-temporal",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Recurrence rule processing using Temporal PlainDate/PlainDateTime",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",