rrule-temporal 1.2.5 → 1.2.6

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
@@ -171,6 +171,7 @@ toText(weekly, "es");
171
171
  | he | Hebrew |
172
172
  | zh | Mandarin |
173
173
  | de | German |
174
+ | fr | French |
174
175
 
175
176
  **NOTE:** At build time you can reduce bundle size by
176
177
  defining the `TOTEXT_LANGS` environment variable (read from `process.env`),
@@ -182,12 +183,20 @@ included by default.
182
183
 
183
184
  This library implements the iCalendar RSCALE and SKIP extensions described in RFC 7529 for defining recurrence rules in non‑Gregorian calendars and for controlling how invalid dates are handled.
184
185
 
186
+ ### Supported Calendars
187
+
188
+ | Calendar | Description |
189
+ |--------------------|----------------------------------|
190
+ | GREGORIAN | Gregorian calendar (default) |
191
+ | CHINESE | Chinese calendar |
192
+ | HEBREW | Hebrew calendar |
193
+ | INDIAN | Saka/Indian National Calendar |
194
+
185
195
  - Spec: RFC 7529 — Non‑Gregorian Recurrence Rules in iCalendar
186
196
  https://www.rfc-editor.org/rfc/rfc7529.html
187
197
 
188
198
  What RSCALE does:
189
199
  - Extends `RRULE` with `RSCALE=<calendar>` to choose the calendar used for recurrence generation while keeping DTSTART/RECURRENCE‑ID/RDATE/EXDATE in Gregorian.
190
- - Supported calendars: `GREGORIAN`, `CHINESE`, `HEBREW`, `INDIAN` (Saka/Indian National Calendar).
191
200
  - Interprets `BY*` parts (month, day, week, etc.) in the specified calendar when expanding occurrences, then converts the generated dates back to the requested time zone.
192
201
 
193
202
  What SKIP does:
@@ -261,7 +270,7 @@ Notes
261
270
  | `next(after?, inclusive?)` | Next occurrence after a given date. |
262
271
  | `previous(before?, inclusive?)` | Previous occurrence before a date. |
263
272
  | `toString()` | Convert the rule back into `DTSTART` and `RRULE` lines. |
264
- | `toText(rule, locale?)` | Human readable description (`en`, `es`, `hi`, `yue`, `ar`, `he`, `zh`). |
273
+ | `toText(rule, locale?)` | Human readable description (`en`, `es`, `hi`, `yue`, `ar`, `he`, `zh`, `fr`). |
265
274
  | `options()` | Return the normalized options object. |
266
275
 
267
276
  ## Further examples
package/dist/totext.cjs CHANGED
@@ -2721,7 +2721,66 @@ var zh = {
2721
2721
  },
2722
2722
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
2723
2723
  };
2724
- var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh };
2724
+ var fr = {
2725
+ weekdayNames: ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"],
2726
+ monthNames: [
2727
+ "Janvier",
2728
+ "F\xE9vrier",
2729
+ "Mars",
2730
+ "Avril",
2731
+ "Mai",
2732
+ "Juin",
2733
+ "Juillet",
2734
+ "Ao\xFBt",
2735
+ "Septembre",
2736
+ "Octobre",
2737
+ "Novembre",
2738
+ "D\xE9cembre"
2739
+ ],
2740
+ units: {
2741
+ year: { singular: "ann\xE9e", plural: "ans" },
2742
+ month: { singular: "mois", plural: "mois" },
2743
+ week: { singular: "semaine", plural: "semaines" },
2744
+ day: { singular: "jour", plural: "jours" },
2745
+ hour: { singular: "heure", plural: "heures" },
2746
+ minute: { singular: "minute", plural: "minutes" },
2747
+ second: { singular: "seconde", plural: "secondes" }
2748
+ },
2749
+ words: {
2750
+ every: "chaque",
2751
+ weekday: "jour de semaine",
2752
+ on: "le",
2753
+ in: "dans",
2754
+ on_the: "le",
2755
+ day_of_month: "jour du mois",
2756
+ day_of_year: "jour de l'ann\xE9e",
2757
+ in_week: "dans la semaine",
2758
+ at: "\xE0",
2759
+ at_minute: "\xE0 la minute",
2760
+ at_second: "\xE0 la seconde",
2761
+ until: "jusqu'\xE0",
2762
+ for: "pendant",
2763
+ time: "fois",
2764
+ times: "fois",
2765
+ instance: "occurrence",
2766
+ week_starts_on: "la semaine commence le",
2767
+ with: "avec",
2768
+ additional_date: "date suppl\xE9mentaire",
2769
+ additional_dates: "dates suppl\xE9mentaires",
2770
+ excluding: "en excluant",
2771
+ date: "date",
2772
+ dates: "dates",
2773
+ and: "et",
2774
+ last: "dernier"
2775
+ },
2776
+ ordinal: (n) => {
2777
+ const abs = Math.abs(n);
2778
+ if (n < 0) return "dernier";
2779
+ if (abs === 1) return "1er";
2780
+ return `${abs}e`;
2781
+ }
2782
+ };
2783
+ var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh, fr };
2725
2784
  var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
2726
2785
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
2727
2786
  var LOCALES = {};
package/dist/totext.js CHANGED
@@ -454,7 +454,66 @@ var zh = {
454
454
  },
455
455
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
456
456
  };
457
- var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh };
457
+ var fr = {
458
+ weekdayNames: ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"],
459
+ monthNames: [
460
+ "Janvier",
461
+ "F\xE9vrier",
462
+ "Mars",
463
+ "Avril",
464
+ "Mai",
465
+ "Juin",
466
+ "Juillet",
467
+ "Ao\xFBt",
468
+ "Septembre",
469
+ "Octobre",
470
+ "Novembre",
471
+ "D\xE9cembre"
472
+ ],
473
+ units: {
474
+ year: { singular: "ann\xE9e", plural: "ans" },
475
+ month: { singular: "mois", plural: "mois" },
476
+ week: { singular: "semaine", plural: "semaines" },
477
+ day: { singular: "jour", plural: "jours" },
478
+ hour: { singular: "heure", plural: "heures" },
479
+ minute: { singular: "minute", plural: "minutes" },
480
+ second: { singular: "seconde", plural: "secondes" }
481
+ },
482
+ words: {
483
+ every: "chaque",
484
+ weekday: "jour de semaine",
485
+ on: "le",
486
+ in: "dans",
487
+ on_the: "le",
488
+ day_of_month: "jour du mois",
489
+ day_of_year: "jour de l'ann\xE9e",
490
+ in_week: "dans la semaine",
491
+ at: "\xE0",
492
+ at_minute: "\xE0 la minute",
493
+ at_second: "\xE0 la seconde",
494
+ until: "jusqu'\xE0",
495
+ for: "pendant",
496
+ time: "fois",
497
+ times: "fois",
498
+ instance: "occurrence",
499
+ week_starts_on: "la semaine commence le",
500
+ with: "avec",
501
+ additional_date: "date suppl\xE9mentaire",
502
+ additional_dates: "dates suppl\xE9mentaires",
503
+ excluding: "en excluant",
504
+ date: "date",
505
+ dates: "dates",
506
+ and: "et",
507
+ last: "dernier"
508
+ },
509
+ ordinal: (n) => {
510
+ const abs = Math.abs(n);
511
+ if (n < 0) return "dernier";
512
+ if (abs === 1) return "1er";
513
+ return `${abs}e`;
514
+ }
515
+ };
516
+ var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh, fr };
458
517
  var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
459
518
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
460
519
  var LOCALES = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-temporal",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
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",