rrule-temporal 1.1.14 → 1.2.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/README.md +83 -10
- package/dist/{chunk-AVHF452E.js → chunk-PDW5N23H.js} +562 -19
- package/dist/index.cjs +562 -19
- package/dist/index.d.cts +31 -2
- package/dist/index.d.ts +31 -2
- package/dist/index.js +1 -1
- package/dist/totext.cjs +567 -19
- package/dist/totext.js +6 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -11,6 +11,10 @@ interface BaseOpts {
|
|
|
11
11
|
maxIterations?: number;
|
|
12
12
|
/** Include DTSTART as an occurrence even if it does not match the rule pattern. */
|
|
13
13
|
includeDtstart?: boolean;
|
|
14
|
+
/** RSCALE per RFC 7529: calendar system for recurrence generation (e.g., GREGORIAN). */
|
|
15
|
+
rscale?: string;
|
|
16
|
+
/** SKIP behavior per RFC 7529: OMIT (default), BACKWARD, FORWARD (requires RSCALE). */
|
|
17
|
+
skip?: 'OMIT' | 'BACKWARD' | 'FORWARD';
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* Manual rule definition following the recurrence rule parts defined in
|
|
@@ -33,8 +37,8 @@ interface ManualOpts extends BaseOpts {
|
|
|
33
37
|
bySecond?: number[];
|
|
34
38
|
/** BYDAY: list of weekdays e.g. ["MO","WE","FR"] */
|
|
35
39
|
byDay?: string[];
|
|
36
|
-
/** BYMONTH: months of the year (1-12) */
|
|
37
|
-
byMonth?: number
|
|
40
|
+
/** BYMONTH: months of the year (1-12). With RSCALE (RFC 7529) may contain values like "5L". */
|
|
41
|
+
byMonth?: Array<number | string>;
|
|
38
42
|
/** BYMONTHDAY: days of the month (1..31 or negative from end) */
|
|
39
43
|
byMonthDay?: number[];
|
|
40
44
|
/** BYYEARDAY: days of the year (1..366 or negative from end) */
|
|
@@ -114,6 +118,12 @@ declare class RRuleTemporal {
|
|
|
114
118
|
* @returns An array of Temporal.ZonedDateTime objects representing all occurrences of the rule.
|
|
115
119
|
*/
|
|
116
120
|
all(iterator?: RRuleTemporalIterator): Temporal.ZonedDateTime[];
|
|
121
|
+
/**
|
|
122
|
+
* RFC 7529: RSCALE present, simple monthly iteration with SKIP behavior.
|
|
123
|
+
* Handles month-to-month stepping from DTSTART's year/month aiming for DTSTART's day-of-month.
|
|
124
|
+
* Applies SKIP=OMIT (skip invalid months), BACKWARD (clamp to last day), FORWARD (first day of next month).
|
|
125
|
+
*/
|
|
126
|
+
private _allMonthlyRscaleSimple;
|
|
117
127
|
/**
|
|
118
128
|
* Converts rDate entries to ZonedDateTime and merges with existing dates.
|
|
119
129
|
* @param dates - Array of dates to merge with
|
|
@@ -197,6 +207,25 @@ declare class RRuleTemporal {
|
|
|
197
207
|
* Generate occurrences for a specific week number in a given year
|
|
198
208
|
*/
|
|
199
209
|
private generateOccurrencesForWeekInYear;
|
|
210
|
+
private getRscaleCalendarId;
|
|
211
|
+
private pad2;
|
|
212
|
+
private monthMatchesToken;
|
|
213
|
+
private monthsOfYear;
|
|
214
|
+
private startOfYear;
|
|
215
|
+
private endOfYear;
|
|
216
|
+
private rscaleFirstWeekStart;
|
|
217
|
+
private rscaleLastWeekCount;
|
|
218
|
+
private lastDayOfMonth;
|
|
219
|
+
private buildZdtFromPlainDate;
|
|
220
|
+
private rscaleMatchesByYearDay;
|
|
221
|
+
private rscaleMatchesByWeekNo;
|
|
222
|
+
private rscaleMatchesByMonth;
|
|
223
|
+
private rscaleMatchesByMonthDay;
|
|
224
|
+
private rscaleMatchesByDayBasic;
|
|
225
|
+
private rscaleDateMatches;
|
|
226
|
+
private applySkipForDay;
|
|
227
|
+
private generateMonthlyOccurrencesRscale;
|
|
228
|
+
private _allRscaleNonGregorian;
|
|
200
229
|
}
|
|
201
230
|
|
|
202
231
|
export { type RRuleOptions, RRuleTemporal };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ interface BaseOpts {
|
|
|
11
11
|
maxIterations?: number;
|
|
12
12
|
/** Include DTSTART as an occurrence even if it does not match the rule pattern. */
|
|
13
13
|
includeDtstart?: boolean;
|
|
14
|
+
/** RSCALE per RFC 7529: calendar system for recurrence generation (e.g., GREGORIAN). */
|
|
15
|
+
rscale?: string;
|
|
16
|
+
/** SKIP behavior per RFC 7529: OMIT (default), BACKWARD, FORWARD (requires RSCALE). */
|
|
17
|
+
skip?: 'OMIT' | 'BACKWARD' | 'FORWARD';
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
16
20
|
* Manual rule definition following the recurrence rule parts defined in
|
|
@@ -33,8 +37,8 @@ interface ManualOpts extends BaseOpts {
|
|
|
33
37
|
bySecond?: number[];
|
|
34
38
|
/** BYDAY: list of weekdays e.g. ["MO","WE","FR"] */
|
|
35
39
|
byDay?: string[];
|
|
36
|
-
/** BYMONTH: months of the year (1-12) */
|
|
37
|
-
byMonth?: number
|
|
40
|
+
/** BYMONTH: months of the year (1-12). With RSCALE (RFC 7529) may contain values like "5L". */
|
|
41
|
+
byMonth?: Array<number | string>;
|
|
38
42
|
/** BYMONTHDAY: days of the month (1..31 or negative from end) */
|
|
39
43
|
byMonthDay?: number[];
|
|
40
44
|
/** BYYEARDAY: days of the year (1..366 or negative from end) */
|
|
@@ -114,6 +118,12 @@ declare class RRuleTemporal {
|
|
|
114
118
|
* @returns An array of Temporal.ZonedDateTime objects representing all occurrences of the rule.
|
|
115
119
|
*/
|
|
116
120
|
all(iterator?: RRuleTemporalIterator): Temporal.ZonedDateTime[];
|
|
121
|
+
/**
|
|
122
|
+
* RFC 7529: RSCALE present, simple monthly iteration with SKIP behavior.
|
|
123
|
+
* Handles month-to-month stepping from DTSTART's year/month aiming for DTSTART's day-of-month.
|
|
124
|
+
* Applies SKIP=OMIT (skip invalid months), BACKWARD (clamp to last day), FORWARD (first day of next month).
|
|
125
|
+
*/
|
|
126
|
+
private _allMonthlyRscaleSimple;
|
|
117
127
|
/**
|
|
118
128
|
* Converts rDate entries to ZonedDateTime and merges with existing dates.
|
|
119
129
|
* @param dates - Array of dates to merge with
|
|
@@ -197,6 +207,25 @@ declare class RRuleTemporal {
|
|
|
197
207
|
* Generate occurrences for a specific week number in a given year
|
|
198
208
|
*/
|
|
199
209
|
private generateOccurrencesForWeekInYear;
|
|
210
|
+
private getRscaleCalendarId;
|
|
211
|
+
private pad2;
|
|
212
|
+
private monthMatchesToken;
|
|
213
|
+
private monthsOfYear;
|
|
214
|
+
private startOfYear;
|
|
215
|
+
private endOfYear;
|
|
216
|
+
private rscaleFirstWeekStart;
|
|
217
|
+
private rscaleLastWeekCount;
|
|
218
|
+
private lastDayOfMonth;
|
|
219
|
+
private buildZdtFromPlainDate;
|
|
220
|
+
private rscaleMatchesByYearDay;
|
|
221
|
+
private rscaleMatchesByWeekNo;
|
|
222
|
+
private rscaleMatchesByMonth;
|
|
223
|
+
private rscaleMatchesByMonthDay;
|
|
224
|
+
private rscaleMatchesByDayBasic;
|
|
225
|
+
private rscaleDateMatches;
|
|
226
|
+
private applySkipForDay;
|
|
227
|
+
private generateMonthlyOccurrencesRscale;
|
|
228
|
+
private _allRscaleNonGregorian;
|
|
200
229
|
}
|
|
201
230
|
|
|
202
231
|
export { type RRuleOptions, RRuleTemporal };
|