rrule-ts 0.2.1 → 0.3.0

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 CHANGED
@@ -107,6 +107,30 @@ This deviation is covered by three documented conformance cases in `packages/con
107
107
  | `dst-berlin-spring-daily` | `Europe/Berlin` | 02:00 in spring-forward gap; dateutil: `02:00+01:00`; rrule-ts: `03:00+02:00` |
108
108
  | `dst-lord-howe-spring-daily` | `Australia/Lord_Howe` | 02:00 in 30-min gap; dateutil: `02:00+10:30`; rrule-ts: `02:30+11:00` |
109
109
 
110
+ ## BYWEEKNO year boundary
111
+
112
+ RFC 5545 defers week numbering to ISO 8601 and its Thursday rule: a week belongs to the
113
+ year that contains its Thursday. rrule-ts applies this rule strictly.
114
+
115
+ For `FREQ=YEARLY;BYWEEKNO=52` starting from `DTSTART:20000101T090000`, rrule-ts emits
116
+ exactly seven occurrences: Mon 2000-12-25 through Sun 2000-12-31. Those are the only days
117
+ whose ISO week-year is 2000 and whose ISO week number is 52.
118
+
119
+ python-dateutil and rrule.js additionally emit 2000-01-01 and 2000-01-02. Those two dates
120
+ fall inside ISO 1999-W52 (the previous ISO year's week 52 extends into the first two days
121
+ of calendar year 2000). Including them is a reasonable reading of the specification because
122
+ those days are in "week 52" of some ISO week-year.
123
+
124
+ rrule-ts takes the stricter interpretation: `FREQ=YEARLY` iterates calendar years, so
125
+ `BYWEEKNO=52` selects only dates whose ISO week-year matches the iteration year. RFC 5545
126
+ does not explicitly resolve this ambiguity at the backward boundary, so both approaches are
127
+ defensible. The rrule-ts divergence is deliberate and documented here; it is not a claim
128
+ that python-dateutil or rrule.js are incorrect.
129
+
130
+ The differential conformance suite in `packages/conformance/src/diff.test.ts` contains a
131
+ hand-authored test for this case that is intentionally excluded from the oracle-derived
132
+ corpus.
133
+
110
134
  ## License
111
135
 
112
136
  MIT
@@ -1,10 +1,14 @@
1
- import type { LocalePack } from './en.js';
2
- export type { LocalePack };
1
+ import type { LocalePack } from './types.js';
2
+ export type { LocalePack, LocaleTokens } from './types.js';
3
3
  /**
4
4
  * German locale pack.
5
5
  *
6
- * @stub Partial data. The full locale will be populated in the expansion phase.
7
- * TODO(expansion-phase): fill all strings and wire into toText.
6
+ * formatInterval: n=1 uses gender-inflected singular ('jeden Tag');
7
+ * n>1 uses 'alle N [Einheit]'.
8
+ * formatOrdinal: positive n -> 'n.' (appends period); -1 -> 'letzten'.
9
+ * formatCount: 'N-mal'.
10
+ * formatList: ' und ' conjunction, no Oxford comma ('A, B und C').
11
+ * formatDate: PlainDate -> 'D. Month YYYY' (German date order).
8
12
  */
9
13
  export declare const de: LocalePack;
10
14
  //# sourceMappingURL=de.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/locales/de.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAEzC,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B;;;;;GAKG;AACH,eAAO,MAAM,EAAE,EAAE,UA0BhB,CAAA"}
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../src/locales/de.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAG5C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAkD1D;;;;;;;;;GASG;AACH,eAAO,MAAM,EAAE,EAAE,UA8EhB,CAAA"}
@@ -1,38 +1,138 @@
1
1
  // German locale pack for rrule-ts/text (import 'rrule-ts/locales/de').
2
2
  //
3
- // Stub for the expansion phase.
4
- // TODO(expansion-phase): provide full German locale strings for toText.
3
+ // Implements the full LocalePack interface with German grammatical gender,
4
+ // period-suffix ordinals, and ' und ' list conjunction (no Oxford comma).
5
+ import { getTemporal } from '../temporal.js';
6
+ // ---------------------------------------------------------------------------
7
+ // Internal tables
8
+ // ---------------------------------------------------------------------------
9
+ const DE_MONTHS = [
10
+ 'Januar',
11
+ 'Februar',
12
+ 'März',
13
+ 'April',
14
+ 'Mai',
15
+ 'Juni',
16
+ 'Juli',
17
+ 'August',
18
+ 'September',
19
+ 'Oktober',
20
+ 'November',
21
+ 'Dezember',
22
+ ];
23
+ // Grammatical gender rules for interval=1 (singular, gender-inflected form).
24
+ // masculine: jeden Tag, jeden Monat
25
+ // feminine: jede Woche, jede Stunde, jede Minute, jede Sekunde
26
+ // neuter: jedes Jahr
27
+ const FREQ_SINGULAR = {
28
+ SECONDLY: 'jede Sekunde',
29
+ MINUTELY: 'jede Minute',
30
+ HOURLY: 'jede Stunde',
31
+ DAILY: 'jeden Tag',
32
+ WEEKLY: 'jede Woche',
33
+ MONTHLY: 'jeden Monat',
34
+ YEARLY: 'jedes Jahr',
35
+ };
36
+ // Plural forms for interval>1 (alle N [unit]).
37
+ const FREQ_PLURAL = {
38
+ SECONDLY: 'Sekunden',
39
+ MINUTELY: 'Minuten',
40
+ HOURLY: 'Stunden',
41
+ DAILY: 'Tage',
42
+ WEEKLY: 'Wochen',
43
+ MONTHLY: 'Monate',
44
+ YEARLY: 'Jahre',
45
+ };
46
+ // ---------------------------------------------------------------------------
47
+ // German locale pack
48
+ // ---------------------------------------------------------------------------
5
49
  /**
6
50
  * German locale pack.
7
51
  *
8
- * @stub Partial data. The full locale will be populated in the expansion phase.
9
- * TODO(expansion-phase): fill all strings and wire into toText.
52
+ * formatInterval: n=1 uses gender-inflected singular ('jeden Tag');
53
+ * n>1 uses 'alle N [Einheit]'.
54
+ * formatOrdinal: positive n -> 'n.' (appends period); -1 -> 'letzten'.
55
+ * formatCount: 'N-mal'.
56
+ * formatList: ' und ' conjunction, no Oxford comma ('A, B und C').
57
+ * formatDate: PlainDate -> 'D. Month YYYY' (German date order).
10
58
  */
11
59
  export const de = {
12
60
  id: 'de',
13
61
  weekdays: ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'],
14
- months: [
15
- 'Januar',
16
- 'Februar',
17
- 'März',
18
- 'April',
19
- 'Mai',
20
- 'Juni',
21
- 'Juli',
22
- 'August',
23
- 'September',
24
- 'Oktober',
25
- 'November',
26
- 'Dezember',
27
- ],
28
- frequencies: {
29
- SECONDLY: 'jede Sekunde',
30
- MINUTELY: 'jede Minute',
31
- HOURLY: 'jede Stunde',
32
- DAILY: 'täglich',
33
- WEEKLY: 'wöchentlich',
34
- MONTHLY: 'monatlich',
35
- YEARLY: 'jährlich',
62
+ months: DE_MONTHS,
63
+ tokens: {
64
+ on: 'am',
65
+ at: 'um',
66
+ in: 'in',
67
+ inSingular: 'im',
68
+ until: 'bis',
69
+ // Empty: German uses 'am' to cover 'on the', so no separate 'the' token.
70
+ the: '',
71
+ last: 'letzten',
72
+ lastDay: 'letzten Tag',
73
+ weekday: 'Werktag',
74
+ },
75
+ formatInterval(n, freq) {
76
+ if (n === 1)
77
+ return FREQ_SINGULAR[freq];
78
+ return `alle ${n} ${FREQ_PLURAL[freq]}`;
79
+ },
80
+ formatOrdinal(n) {
81
+ // German ordinals use a period suffix: 1. 2. 3. etc.
82
+ // For -1 (adjectival 'last' in BYDAY context): 'letzten'.
83
+ if (n === -1)
84
+ return 'letzten';
85
+ // For -2 (second-to-last): 'vorletzten'.
86
+ if (n === -2)
87
+ return 'vorletzten';
88
+ const abs = Math.abs(n);
89
+ return `${abs}.`;
90
+ },
91
+ formatCount(n) {
92
+ return `${n}-mal`;
93
+ },
94
+ formatList(items) {
95
+ if (items.length === 0)
96
+ return '';
97
+ if (items.length === 1)
98
+ return items[0];
99
+ if (items.length === 2)
100
+ return `${items[0]} und ${items[1]}`;
101
+ // No Oxford comma in German: "A, B und C"
102
+ return `${items.slice(0, -1).join(', ')} und ${items[items.length - 1]}`;
103
+ },
104
+ formatDate(date) {
105
+ // German date order: D. Month YYYY
106
+ const T = getTemporal();
107
+ // Use instanceof to safely identify the Temporal variant.
108
+ if (date instanceof T.Instant) {
109
+ const dt = date.toZonedDateTimeISO('UTC');
110
+ const min = String(dt.minute).padStart(2, '0');
111
+ return `${dt.day}. ${DE_MONTHS[dt.month - 1]} ${dt.year} um ${dt.hour}:${min}`;
112
+ }
113
+ if (date instanceof T.PlainDateTime) {
114
+ const min = String(date.minute).padStart(2, '0');
115
+ return `${date.day}. ${DE_MONTHS[date.month - 1]} ${date.year} um ${date.hour}:${min}`;
116
+ }
117
+ const d = date;
118
+ return `${d.day}. ${DE_MONTHS[d.month - 1]} ${d.year}`;
119
+ },
120
+ formatNthToLastDay(n) {
121
+ // n is the absolute value (n >= 2).
122
+ // DE: n=2 -> 'vorletzten Tag' (German has a specific word for second-to-last).
123
+ // n>=3 -> 'N.-letzten Tag' (literal period-ordinal + letzten Tag).
124
+ if (n === 2)
125
+ return 'vorletzten Tag';
126
+ return `${n}.-letzten Tag`;
127
+ },
128
+ formatNthToLastOrdinal(n) {
129
+ // n is the absolute value (n >= 2).
130
+ // Returns the adjectival "Nth-to-last" form used before a weekday name in BYDAY.
131
+ // DE: n=2 -> 'vorletzten', n>=3 -> 'N.-letzten'.
132
+ if (n === 2)
133
+ return 'vorletzten';
134
+ return `${n}.-letzten`;
36
135
  },
136
+ complexRuleFallback: '(komplexe Wiederholungsregel)',
37
137
  };
38
138
  //# sourceMappingURL=de.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"de.js","sourceRoot":"","sources":["../../src/locales/de.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,gCAAgC;AAChC,wEAAwE;AAMxE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAe;IAC5B,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;IAC3F,MAAM,EAAE;QACN,QAAQ;QACR,SAAS;QACT,MAAM;QACN,OAAO;QACP,KAAK;QACL,MAAM;QACN,MAAM;QACN,QAAQ;QACR,WAAW;QAC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ACxD,CAAC;IAED,kBAAkB,CAAC,CAAS;QAC1B,oCAAoC;QACpC,+EAA+E;QAC/E,mEAAmE;QACnE,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,gBAAgB,CAAA;QACpC,OAAO,GAAG,CAAC,eAAe,CAAA;IAC5B,CAAC;IAED,sBAAsB,CAAC,CAAS;QAC9B,oCAAoC;QACpC,iFAAiF;QACjF,iDAAiD;QACjD,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,YAAY,CAAA;QAChC,OAAO,GAAG,CAAC,WAAW,CAAA;IACxB,CAAC;IAED,mBAAmB,EAAE,+BAA+B;CACrD,CAAA"}
@@ -1,32 +1,13 @@
1
- /** Shape of a locale pack used by toText. */
2
- export interface LocalePack {
3
- /** Locale identifier. */
4
- id: string;
5
- /** Weekday names, indexed 0=Monday ... 6=Sunday. */
6
- weekdays: [string, string, string, string, string, string, string];
7
- /** Month names, indexed 0=January ... 11=December. */
8
- months: [
9
- string,
10
- string,
11
- string,
12
- string,
13
- string,
14
- string,
15
- string,
16
- string,
17
- string,
18
- string,
19
- string,
20
- string
21
- ];
22
- /** Frequency labels. */
23
- frequencies: Record<string, string>;
24
- }
1
+ import type { LocalePack } from './types.js';
2
+ export type { LocalePack, LocaleTokens } from './types.js';
25
3
  /**
26
4
  * English locale pack.
27
5
  *
28
- * @stub Partial data. The full locale will be populated in the expansion phase.
29
- * TODO(expansion-phase): fill all strings and wire into toText.
6
+ * formatInterval: n=1 -> 'every day'; n>1 -> 'every N days'.
7
+ * formatOrdinal: 1->'1st', 2->'2nd', 3->'3rd', 4->'4th', -1->'last'.
8
+ * formatCount: 1->'1 time'; N->'N times'.
9
+ * formatList: Oxford comma ('A, B, and C').
10
+ * formatDate: PlainDate -> 'January 1, 2025'; DateTime/Instant -> '...at H:MM'.
30
11
  */
31
12
  export declare const en: LocalePack;
32
13
  //# sourceMappingURL=en.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAKA,6CAA6C;AAC7C,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,oDAAoD;IACpD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClE,sDAAsD;IACtD,MAAM,EAAE;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;KACP,CAAA;IACD,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACpC;AAED;;;;;GAKG;AACH,eAAO,MAAM,EAAE,EAAE,UA0BhB,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAG5C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AA6C1D;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE,EAAE,UAmHhB,CAAA"}
@@ -1,38 +1,178 @@
1
1
  // English locale pack for rrule-ts/text (import 'rrule-ts/locales/en').
2
2
  //
3
- // Stub for the expansion phase.
4
- // TODO(expansion-phase): provide full English locale strings for toText.
3
+ // Implements the full LocalePack interface from types.ts with production-quality
4
+ // English strings and formatters.
5
+ import { getTemporal } from '../temporal.js';
6
+ // ---------------------------------------------------------------------------
7
+ // Internal tables (referenced from methods to avoid closure-over-self issues)
8
+ // ---------------------------------------------------------------------------
9
+ const EN_MONTHS = [
10
+ 'January',
11
+ 'February',
12
+ 'March',
13
+ 'April',
14
+ 'May',
15
+ 'June',
16
+ 'July',
17
+ 'August',
18
+ 'September',
19
+ 'October',
20
+ 'November',
21
+ 'December',
22
+ ];
23
+ const FREQ_SINGULAR = {
24
+ SECONDLY: 'every second',
25
+ MINUTELY: 'every minute',
26
+ HOURLY: 'every hour',
27
+ DAILY: 'every day',
28
+ WEEKLY: 'every week',
29
+ MONTHLY: 'every month',
30
+ YEARLY: 'every year',
31
+ };
32
+ const FREQ_PLURAL = {
33
+ SECONDLY: 'seconds',
34
+ MINUTELY: 'minutes',
35
+ HOURLY: 'hours',
36
+ DAILY: 'days',
37
+ WEEKLY: 'weeks',
38
+ MONTHLY: 'months',
39
+ YEARLY: 'years',
40
+ };
41
+ // ---------------------------------------------------------------------------
42
+ // English locale pack
43
+ // ---------------------------------------------------------------------------
5
44
  /**
6
45
  * English locale pack.
7
46
  *
8
- * @stub Partial data. The full locale will be populated in the expansion phase.
9
- * TODO(expansion-phase): fill all strings and wire into toText.
47
+ * formatInterval: n=1 -> 'every day'; n>1 -> 'every N days'.
48
+ * formatOrdinal: 1->'1st', 2->'2nd', 3->'3rd', 4->'4th', -1->'last'.
49
+ * formatCount: 1->'1 time'; N->'N times'.
50
+ * formatList: Oxford comma ('A, B, and C').
51
+ * formatDate: PlainDate -> 'January 1, 2025'; DateTime/Instant -> '...at H:MM'.
10
52
  */
11
53
  export const en = {
12
54
  id: 'en',
13
55
  weekdays: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
14
- months: [
15
- 'January',
16
- 'February',
17
- 'March',
18
- 'April',
19
- 'May',
20
- 'June',
21
- 'July',
22
- 'August',
23
- 'September',
24
- 'October',
25
- 'November',
26
- 'December',
27
- ],
28
- frequencies: {
29
- SECONDLY: 'every second',
30
- MINUTELY: 'every minute',
31
- HOURLY: 'every hour',
32
- DAILY: 'every day',
33
- WEEKLY: 'every week',
34
- MONTHLY: 'every month',
35
- YEARLY: 'every year',
56
+ months: EN_MONTHS,
57
+ tokens: {
58
+ on: 'on',
59
+ at: 'at',
60
+ in: 'in',
61
+ inSingular: 'in',
62
+ until: 'until',
63
+ the: 'the',
64
+ last: 'last',
65
+ lastDay: 'last day',
66
+ weekday: 'weekday',
67
+ },
68
+ formatInterval(n, freq) {
69
+ if (n === 1)
70
+ return FREQ_SINGULAR[freq];
71
+ return `every ${n} ${FREQ_PLURAL[freq]}`;
72
+ },
73
+ formatOrdinal(n) {
74
+ if (n === -1)
75
+ return 'last';
76
+ const abs = Math.abs(n);
77
+ const mod100 = abs % 100;
78
+ const mod10 = abs % 10;
79
+ let suffix;
80
+ if (mod100 >= 11 && mod100 <= 13) {
81
+ // 11th, 12th, 13th: special case
82
+ suffix = 'th';
83
+ }
84
+ else if (mod10 === 1) {
85
+ suffix = 'st';
86
+ }
87
+ else if (mod10 === 2) {
88
+ suffix = 'nd';
89
+ }
90
+ else if (mod10 === 3) {
91
+ suffix = 'rd';
92
+ }
93
+ else {
94
+ suffix = 'th';
95
+ }
96
+ return `${abs}${suffix}`;
97
+ },
98
+ formatCount(n) {
99
+ return n === 1 ? '1 time' : `${n} times`;
100
+ },
101
+ formatList(items) {
102
+ if (items.length === 0)
103
+ return '';
104
+ if (items.length === 1)
105
+ return items[0];
106
+ if (items.length === 2)
107
+ return `${items[0]} and ${items[1]}`;
108
+ // Oxford comma: "A, B, and C"
109
+ return `${items.slice(0, -1).join(', ')}, and ${items[items.length - 1]}`;
110
+ },
111
+ formatDate(date) {
112
+ const T = getTemporal();
113
+ // Use instanceof to safely identify the Temporal variant.
114
+ if (date instanceof T.Instant) {
115
+ const dt = date.toZonedDateTimeISO('UTC');
116
+ const min = String(dt.minute).padStart(2, '0');
117
+ return `${EN_MONTHS[dt.month - 1]} ${dt.day}, ${dt.year} at ${dt.hour}:${min}`;
118
+ }
119
+ if (date instanceof T.PlainDateTime) {
120
+ const min = String(date.minute).padStart(2, '0');
121
+ return `${EN_MONTHS[date.month - 1]} ${date.day}, ${date.year} at ${date.hour}:${min}`;
122
+ }
123
+ // Temporal.PlainDate
124
+ const d = date;
125
+ return `${EN_MONTHS[d.month - 1]} ${d.day}, ${d.year}`;
126
+ },
127
+ formatNthToLastDay(n) {
128
+ // n is the absolute value (n >= 2).
129
+ // EN: '2nd-to-last day', '3rd-to-last day', etc.
130
+ const abs = n;
131
+ const mod100 = abs % 100;
132
+ const mod10 = abs % 10;
133
+ let suffix;
134
+ if (mod100 >= 11 && mod100 <= 13) {
135
+ suffix = 'th';
136
+ }
137
+ else if (mod10 === 1) {
138
+ suffix = 'st';
139
+ }
140
+ else if (mod10 === 2) {
141
+ suffix = 'nd';
142
+ }
143
+ else if (mod10 === 3) {
144
+ suffix = 'rd';
145
+ }
146
+ else {
147
+ suffix = 'th';
148
+ }
149
+ return `${abs}${suffix}-to-last day`;
150
+ },
151
+ formatNthToLastOrdinal(n) {
152
+ // n is the absolute value (n >= 2).
153
+ // Returns the adjectival "Nth-to-last" form used before a weekday name in BYDAY.
154
+ // EN: 2 -> '2nd-to-last', 3 -> '3rd-to-last', 11 -> '11th-to-last', etc.
155
+ const abs = n;
156
+ const mod100 = abs % 100;
157
+ const mod10 = abs % 10;
158
+ let suffix;
159
+ if (mod100 >= 11 && mod100 <= 13) {
160
+ suffix = 'th';
161
+ }
162
+ else if (mod10 === 1) {
163
+ suffix = 'st';
164
+ }
165
+ else if (mod10 === 2) {
166
+ suffix = 'nd';
167
+ }
168
+ else if (mod10 === 3) {
169
+ suffix = 'rd';
170
+ }
171
+ else {
172
+ suffix = 'th';
173
+ }
174
+ return `${abs}${suffix}-to-last`;
36
175
  },
176
+ complexRuleFallback: '(complex recurrence rule)',
37
177
  };
38
178
  //# sourceMappingURL=en.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","sourceRoot":"","sources":["../../src/locales/en.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,EAAE;AACF,gCAAgC;AAChC,yEAAyE;AA2BzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,EAAE,GAAe;IAC5B,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE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ACD,OAAO,GAAG,GAAG,GAAG,MAAM,cAAc,CAAA;IACtC,CAAC;IAED,sBAAsB,CAAC,CAAS;QAC9B,oCAAoC;QACpC,iFAAiF;QACjF,yEAAyE;QACzE,MAAM,GAAG,GAAG,CAAC,CAAA;QACb,MAAM,MAAM,GAAG,GAAG,GAAG,GAAG,CAAA;QACxB,MAAM,KAAK,GAAG,GAAG,GAAG,EAAE,CAAA;QACtB,IAAI,MAAc,CAAA;QAClB,IAAI,MAAM,IAAI,EAAE,IAAI,MAAM,IAAI,EAAE,EAAE,CAAC;YACjC,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;aAAM,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;aAAM,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;aAAM,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACvB,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,IAAI,CAAA;QACf,CAAC;QACD,OAAO,GAAG,GAAG,GAAG,MAAM,UAAU,CAAA;IAClC,CAAC;IAED,mBAAmB,EAAE,2BAA2B;CACjD,CAAA"}
@@ -0,0 +1,113 @@
1
+ import type { Frequency, RRuleUntil } from '../types.js';
2
+ /**
3
+ * Fixed-string connective tokens used to assemble human-readable RRULE clauses.
4
+ * Each token is a locale-specific word or phrase.
5
+ */
6
+ export interface LocaleTokens {
7
+ /** Precedes a BYDAY or BYMONTHDAY clause. EN: 'on', DE: 'am' */
8
+ on: string;
9
+ /** Precedes a BYHOUR time clause. EN: 'at', DE: 'um' */
10
+ at: string;
11
+ /** Precedes a multi-month BYMONTH clause. EN: 'in', DE: 'in' */
12
+ in: string;
13
+ /** Precedes a single-month BYMONTH clause. EN: 'in', DE: 'im' */
14
+ inSingular: string;
15
+ /** Precedes the UNTIL date. EN: 'until', DE: 'bis' */
16
+ until: string;
17
+ /** Appears between 'on' and an ordinal. EN: 'the', DE: '' (empty, not used in German) */
18
+ the: string;
19
+ /** Used for the -1 ordinal in adjectival BYDAY position. EN: 'last', DE: 'letzten' */
20
+ last: string;
21
+ /** Rendered for BYMONTHDAY=-1. EN: 'last day', DE: 'letzten Tag' */
22
+ lastDay: string;
23
+ /** Used for the BYSETPOS=-1 + Mon-Fri weekday set pattern. EN: 'weekday', DE: 'Werktag' */
24
+ weekday: string;
25
+ }
26
+ /**
27
+ * A locale pack supplies all human-language strings and formatter functions
28
+ * needed by toText. Consumers pass a LocalePack object directly to toText
29
+ * instead of a locale identifier string, which preserves tree-shaking: only
30
+ * imported locale packs are included in the consumer bundle.
31
+ *
32
+ * The frequencies Record is intentionally absent. All interval phrasing is
33
+ * delegated to formatInterval so that each locale can handle grammatical gender
34
+ * and number agreement (e.g. German jeden/jede/jedes vs alle N).
35
+ */
36
+ export interface LocalePack {
37
+ /** Locale identifier, e.g. 'en' or 'de'. */
38
+ id: string;
39
+ /**
40
+ * Weekday display names in RFC 5545 order.
41
+ * Index 0 = Monday (MO) through index 6 = Sunday (SU).
42
+ */
43
+ weekdays: [string, string, string, string, string, string, string];
44
+ /**
45
+ * Month display names.
46
+ * Index 0 = January through index 11 = December.
47
+ */
48
+ months: [
49
+ string,
50
+ string,
51
+ string,
52
+ string,
53
+ string,
54
+ string,
55
+ string,
56
+ string,
57
+ string,
58
+ string,
59
+ string,
60
+ string
61
+ ];
62
+ /** Fixed-string connective tokens for clause assembly. */
63
+ tokens: LocaleTokens;
64
+ /**
65
+ * Render an interval phrase. When n=1 returns singular (e.g. 'every day').
66
+ * When n>1 returns plural with count (e.g. 'every 2 days').
67
+ * Must handle grammatical gender per language.
68
+ */
69
+ formatInterval(n: number, freq: Frequency): string;
70
+ /**
71
+ * Render an ordinal for a BYDAY or BYSETPOS position.
72
+ * Positive n: 1->'1st' (EN), '1.' (DE).
73
+ * Negative n: -1->'last' (EN adjectival form), 'letzten' (DE).
74
+ */
75
+ formatOrdinal(n: number): string;
76
+ /**
77
+ * Render a COUNT value as a human phrase.
78
+ * EN: 1->'1 time', 5->'5 times'. DE: '5-mal'.
79
+ */
80
+ formatCount(n: number): string;
81
+ /**
82
+ * Join a list of strings with locale-appropriate conjunction.
83
+ * EN: Oxford comma ('A, B, and C'). DE: ' und ' with no Oxford comma ('A, B und C').
84
+ */
85
+ formatList(items: string[]): string;
86
+ /**
87
+ * Render an UNTIL date as a human-readable string.
88
+ * Temporal.PlainDate -> date only (e.g. 'January 1, 2025').
89
+ * Temporal.PlainDateTime or Temporal.Instant -> date + time.
90
+ */
91
+ formatDate(date: RRuleUntil): string;
92
+ /**
93
+ * Render a "Nth-to-last day" phrase for negative BYMONTHDAY values below -1.
94
+ * n is the absolute value (n >= 2). The phrase must be in the target language.
95
+ * EN: n=2 -> '2nd-to-last day'. DE: n=2 -> 'vorletzten Tag', n=3 -> '3.-letzten Tag'.
96
+ */
97
+ formatNthToLastDay(n: number): string;
98
+ /**
99
+ * Render just the adjectival "nth-to-last" ordinal for a negative BYDAY ordinal
100
+ * below -1 (e.g. ordinal=-2 for -2MO). n is the absolute value (n >= 2).
101
+ * The returned string is combined with a weekday name by toText.
102
+ * EN: n=2 -> '2nd-to-last'. DE: n=2 -> 'vorletzten', n=3 -> '3.-letzten'.
103
+ */
104
+ formatNthToLastOrdinal(n: number): string;
105
+ /**
106
+ * The phrase returned by toText when a rule cannot be expressed naturally.
107
+ * Callers who compare against COMPLEX_RULE_FALLBACK should use the EN locale
108
+ * or compare against locale.complexRuleFallback for the locale they use.
109
+ * EN: '(complex recurrence rule)'. DE: '(komplexe Wiederholungsregel)'.
110
+ */
111
+ complexRuleFallback: string;
112
+ }
113
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/locales/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAA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UAAU,GAAG,MAAM,CAAA;IAEpC;;;;OAIG;IACH,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAErC;;;;;OAKG;IACH,sBAAsB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEzC;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAA;CAC5B"}
@@ -0,0 +1,7 @@
1
+ // LocalePack and LocaleTokens interfaces for rrule-ts i18n text rendering.
2
+ //
3
+ // Locale packs are plain objects with static tables and formatter functions.
4
+ // They are imported per-locale (e.g. 'rrule-ts/locales/en') so tree-shaking
5
+ // works: unused locales add zero bytes to the consumer bundle.
6
+ export {};
7
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/locales/types.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+DAA+D"}