rrule-temporal 1.0.0 → 1.1.1

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/index.d.cts CHANGED
@@ -1,21 +1,20 @@
1
1
  import { Temporal } from '@js-temporal/polyfill';
2
2
 
3
- type Freq = "YEARLY" | "MONTHLY" | "WEEKLY" | "DAILY" | "HOURLY" | "MINUTELY" | "SECONDLY";
3
+ type Freq = 'YEARLY' | 'MONTHLY' | 'WEEKLY' | 'DAILY' | 'HOURLY' | 'MINUTELY' | 'SECONDLY';
4
4
  /**
5
5
  * Shared options for all rule constructors.
6
- *
7
- * @property tzid - Time zone identifier as defined in RFC 5545 §3.2.19.
8
- * @property maxIterations - Safety cap when generating occurrences.
9
- * @property includeDtstart - Include DTSTART even if it does not match the rule.
10
6
  */
11
7
  interface BaseOpts {
8
+ /** Time zone identifier as defined in RFC 5545 §3.2.19. */
12
9
  tzid?: string;
10
+ /** Safety cap when generating occurrences. */
13
11
  maxIterations?: number;
12
+ /** Include DTSTART as an occurrence even if it does not match the rule pattern. */
14
13
  includeDtstart?: boolean;
15
14
  }
16
15
  /**
17
16
  * Manual rule definition following the recurrence rule parts defined in
18
- * RFC 5545 §3.3.10.
17
+ * RFC 5545 §3.3.10.
19
18
  */
20
19
  interface ManualOpts extends BaseOpts {
21
20
  /** FREQ: recurrence frequency */
@@ -63,9 +62,9 @@ declare class RRuleTemporal {
63
62
  private opts;
64
63
  private maxIterations;
65
64
  private includeDtstart;
66
- constructor(params: {
65
+ constructor(params: ({
67
66
  rruleString: string;
68
- } | ManualOpts);
67
+ } & BaseOpts) | ManualOpts);
69
68
  private sanitizeOpts;
70
69
  private rawAdvance;
71
70
  /** Expand one base ZonedDateTime into all BYHOUR × BYMINUTE × BYSECOND
@@ -76,12 +75,12 @@ declare class RRuleTemporal {
76
75
  private nextCandidateSameDate;
77
76
  private applyTimeOverride;
78
77
  private computeFirst;
79
- private generateWeeklyOccurrences;
80
78
  private matchesByDay;
81
79
  private matchesByMonth;
82
80
  private matchesByMonthDay;
83
81
  private matchesAll;
84
82
  private matchesByYearDay;
83
+ private getIsoWeekInfo;
85
84
  private matchesByWeekNo;
86
85
  options(): ManualOpts;
87
86
  /**
@@ -138,6 +137,7 @@ declare class RRuleTemporal {
138
137
  */
139
138
  previous(before?: Date | Temporal.ZonedDateTime, inc?: boolean): Temporal.ZonedDateTime | null;
140
139
  toString(): string;
140
+ private joinDates;
141
141
  /**
142
142
  * Given any date in a month, return all the ZonedDateTimes in that month
143
143
  * matching your opts.byDay and opts.byMonth (or the single "same day" if no BYDAY).
@@ -150,7 +150,6 @@ declare class RRuleTemporal {
150
150
  */
151
151
  private generateYearlyOccurrences;
152
152
  private applyBySetPos;
153
- private mergeRDates;
154
153
  }
155
154
 
156
155
  export { type RRuleOptions, RRuleTemporal };
package/dist/index.d.ts CHANGED
@@ -1,21 +1,20 @@
1
1
  import { Temporal } from '@js-temporal/polyfill';
2
2
 
3
- type Freq = "YEARLY" | "MONTHLY" | "WEEKLY" | "DAILY" | "HOURLY" | "MINUTELY" | "SECONDLY";
3
+ type Freq = 'YEARLY' | 'MONTHLY' | 'WEEKLY' | 'DAILY' | 'HOURLY' | 'MINUTELY' | 'SECONDLY';
4
4
  /**
5
5
  * Shared options for all rule constructors.
6
- *
7
- * @property tzid - Time zone identifier as defined in RFC 5545 §3.2.19.
8
- * @property maxIterations - Safety cap when generating occurrences.
9
- * @property includeDtstart - Include DTSTART even if it does not match the rule.
10
6
  */
11
7
  interface BaseOpts {
8
+ /** Time zone identifier as defined in RFC 5545 §3.2.19. */
12
9
  tzid?: string;
10
+ /** Safety cap when generating occurrences. */
13
11
  maxIterations?: number;
12
+ /** Include DTSTART as an occurrence even if it does not match the rule pattern. */
14
13
  includeDtstart?: boolean;
15
14
  }
16
15
  /**
17
16
  * Manual rule definition following the recurrence rule parts defined in
18
- * RFC 5545 §3.3.10.
17
+ * RFC 5545 §3.3.10.
19
18
  */
20
19
  interface ManualOpts extends BaseOpts {
21
20
  /** FREQ: recurrence frequency */
@@ -63,9 +62,9 @@ declare class RRuleTemporal {
63
62
  private opts;
64
63
  private maxIterations;
65
64
  private includeDtstart;
66
- constructor(params: {
65
+ constructor(params: ({
67
66
  rruleString: string;
68
- } | ManualOpts);
67
+ } & BaseOpts) | ManualOpts);
69
68
  private sanitizeOpts;
70
69
  private rawAdvance;
71
70
  /** Expand one base ZonedDateTime into all BYHOUR × BYMINUTE × BYSECOND
@@ -76,12 +75,12 @@ declare class RRuleTemporal {
76
75
  private nextCandidateSameDate;
77
76
  private applyTimeOverride;
78
77
  private computeFirst;
79
- private generateWeeklyOccurrences;
80
78
  private matchesByDay;
81
79
  private matchesByMonth;
82
80
  private matchesByMonthDay;
83
81
  private matchesAll;
84
82
  private matchesByYearDay;
83
+ private getIsoWeekInfo;
85
84
  private matchesByWeekNo;
86
85
  options(): ManualOpts;
87
86
  /**
@@ -138,6 +137,7 @@ declare class RRuleTemporal {
138
137
  */
139
138
  previous(before?: Date | Temporal.ZonedDateTime, inc?: boolean): Temporal.ZonedDateTime | null;
140
139
  toString(): string;
140
+ private joinDates;
141
141
  /**
142
142
  * Given any date in a month, return all the ZonedDateTimes in that month
143
143
  * matching your opts.byDay and opts.byMonth (or the single "same day" if no BYDAY).
@@ -150,7 +150,6 @@ declare class RRuleTemporal {
150
150
  */
151
151
  private generateYearlyOccurrences;
152
152
  private applyBySetPos;
153
- private mergeRDates;
154
153
  }
155
154
 
156
155
  export { type RRuleOptions, RRuleTemporal };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RRuleTemporal
3
- } from "./chunk-U2SCUIWP.js";
3
+ } from "./chunk-6A2XASAM.js";
4
4
  export {
5
5
  RRuleTemporal
6
6
  };