rrule-temporal 1.2.1 → 1.2.3

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
@@ -1,4 +1,4 @@
1
- # rrule-temporal
1
+ # RRule Temporal
2
2
 
3
3
  The first and only fully compliant Recurrence rule ([RFC-5545](https://www.rfc-editor.org/rfc/rfc5545.html)) processing JS/TS library built on the Temporal API, now with support for [RFC-7529](https://www.rfc-editor.org/rfc/rfc7529.html) (RSCALE / SKIP) for non-Gregorian calendars.
4
4
  The library accepts the familiar `RRULE` format and returns
@@ -6,7 +6,7 @@ The library accepts the familiar `RRULE` format and returns
6
6
 
7
7
  See the [demo site](https://ggaabe.github.io/rrule-temporal/) for an interactive playground.
8
8
 
9
- > This library was created to advance the rrule library to use Temporal, and to provide a more modern API, as the original rrule.js library is [not maintained anymore](https://github.com/jkbrzt/rrule/issues/615) and based on Date. Its maintainers suggested a new library based on Temporal instead of Date should be created:
9
+ > RRule-temporal was created to advance the JS RRule ecosystem to use Temporal instead of Date, and to properly support cross-timezone and calendar aware recurrence rules, as per the suggestion of rrule.js contributors.
10
10
  >https://github.com/jkbrzt/rrule/issues/450#issuecomment-1055853095
11
11
 
12
12
  ## Installation
@@ -150,6 +150,7 @@ toText(weekly, "es");
150
150
  | ar | Arabic |
151
151
  | he | Hebrew |
152
152
  | zh | Mandarin |
153
+ | de | German |
153
154
 
154
155
  **NOTE:** At build time you can reduce bundle size by
155
156
  defining the `TOTEXT_LANGS` environment variable (read from `process.env`),
package/dist/totext.cjs CHANGED
@@ -2314,6 +2314,63 @@ var en = {
2314
2314
  return n < 0 ? `last` : `${abs}${suffix}`;
2315
2315
  }
2316
2316
  };
2317
+ var de = {
2318
+ weekdayNames: ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
2319
+ monthNames: [
2320
+ "Januar",
2321
+ "Februar",
2322
+ "M\xE4rz",
2323
+ "April",
2324
+ "Mai",
2325
+ "Juni",
2326
+ "Juli",
2327
+ "August",
2328
+ "September",
2329
+ "Oktober",
2330
+ "November",
2331
+ "Dezember"
2332
+ ],
2333
+ units: {
2334
+ year: { singular: "Jahr", plural: "Jahre" },
2335
+ month: { singular: "Monat", plural: "Monate" },
2336
+ week: { singular: "Woche", plural: "Wochen" },
2337
+ day: { singular: "Tag", plural: "Tage" },
2338
+ hour: { singular: "Stunde", plural: "Stunden" },
2339
+ minute: { singular: "Minute", plural: "Minuten" },
2340
+ second: { singular: "Sekunde", plural: "Sekunden" }
2341
+ },
2342
+ words: {
2343
+ every: "jede/n/s",
2344
+ weekday: "Werktag",
2345
+ on: "am",
2346
+ in: "im",
2347
+ on_the: "am",
2348
+ day_of_month: "Tag des Monats",
2349
+ day_of_year: "Tag des Jahres",
2350
+ in_week: "in Kalenderwoche",
2351
+ at: "um",
2352
+ at_minute: "in Minute",
2353
+ at_second: "in Sekunde",
2354
+ until: "bis",
2355
+ for: "f\xFCr",
2356
+ time: "Mal",
2357
+ times: "Mal",
2358
+ instance: "Vorkommen",
2359
+ week_starts_on: "Woche beginnt am",
2360
+ with: "mit",
2361
+ additional_date: "zus\xE4tzlichem Datum",
2362
+ additional_dates: "zus\xE4tzlichen Daten",
2363
+ excluding: "ohne",
2364
+ date: "Datum",
2365
+ dates: "Daten",
2366
+ and: "und",
2367
+ last: "letzter"
2368
+ },
2369
+ ordinal: (n) => {
2370
+ if (n < 0) return "letzten";
2371
+ return `${Math.abs(n)}.`;
2372
+ }
2373
+ };
2317
2374
  var es = {
2318
2375
  weekdayNames: ["lunes", "martes", "mi\xE9rcoles", "jueves", "viernes", "s\xE1bado", "domingo"],
2319
2376
  monthNames: [
@@ -2650,7 +2707,7 @@ var zh = {
2650
2707
  },
2651
2708
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
2652
2709
  };
2653
- var ALL_LOCALES = { en, es, hi, yue, ar, he, zh };
2710
+ var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh };
2654
2711
  var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
2655
2712
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
2656
2713
  var LOCALES = {};
package/dist/totext.js CHANGED
@@ -61,6 +61,63 @@ var en = {
61
61
  return n < 0 ? `last` : `${abs}${suffix}`;
62
62
  }
63
63
  };
64
+ var de = {
65
+ weekdayNames: ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
66
+ monthNames: [
67
+ "Januar",
68
+ "Februar",
69
+ "M\xE4rz",
70
+ "April",
71
+ "Mai",
72
+ "Juni",
73
+ "Juli",
74
+ "August",
75
+ "September",
76
+ "Oktober",
77
+ "November",
78
+ "Dezember"
79
+ ],
80
+ units: {
81
+ year: { singular: "Jahr", plural: "Jahre" },
82
+ month: { singular: "Monat", plural: "Monate" },
83
+ week: { singular: "Woche", plural: "Wochen" },
84
+ day: { singular: "Tag", plural: "Tage" },
85
+ hour: { singular: "Stunde", plural: "Stunden" },
86
+ minute: { singular: "Minute", plural: "Minuten" },
87
+ second: { singular: "Sekunde", plural: "Sekunden" }
88
+ },
89
+ words: {
90
+ every: "jede/n/s",
91
+ weekday: "Werktag",
92
+ on: "am",
93
+ in: "im",
94
+ on_the: "am",
95
+ day_of_month: "Tag des Monats",
96
+ day_of_year: "Tag des Jahres",
97
+ in_week: "in Kalenderwoche",
98
+ at: "um",
99
+ at_minute: "in Minute",
100
+ at_second: "in Sekunde",
101
+ until: "bis",
102
+ for: "f\xFCr",
103
+ time: "Mal",
104
+ times: "Mal",
105
+ instance: "Vorkommen",
106
+ week_starts_on: "Woche beginnt am",
107
+ with: "mit",
108
+ additional_date: "zus\xE4tzlichem Datum",
109
+ additional_dates: "zus\xE4tzlichen Daten",
110
+ excluding: "ohne",
111
+ date: "Datum",
112
+ dates: "Daten",
113
+ and: "und",
114
+ last: "letzter"
115
+ },
116
+ ordinal: (n) => {
117
+ if (n < 0) return "letzten";
118
+ return `${Math.abs(n)}.`;
119
+ }
120
+ };
64
121
  var es = {
65
122
  weekdayNames: ["lunes", "martes", "mi\xE9rcoles", "jueves", "viernes", "s\xE1bado", "domingo"],
66
123
  monthNames: [
@@ -397,7 +454,7 @@ var zh = {
397
454
  },
398
455
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
399
456
  };
400
- var ALL_LOCALES = { en, es, hi, yue, ar, he, zh };
457
+ var ALL_LOCALES = { en, de, es, hi, yue, ar, he, zh };
401
458
  var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
402
459
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
403
460
  var LOCALES = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-temporal",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
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",
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "scripts": {
21
21
  "build": "rm -rf dist && tsup",
22
- "test": "jest --coverage=false",
23
- "coverage": "jest",
22
+ "test": "vitest run",
23
+ "coverage": "vitest run --coverage",
24
24
  "format": "./node_modules/.bin/prettier --write 'src/**/*.ts'",
25
25
  "prepare": "npm run build"
26
26
  },
@@ -47,14 +47,12 @@
47
47
  "dist"
48
48
  ],
49
49
  "devDependencies": {
50
- "@types/jest": "^29.5.14",
51
- "@types/node": "^22.14.1",
52
- "jest": "^29.7.0",
50
+ "@types/node": "^24.9.1",
51
+ "@vitest/coverage-v8": "^3.2.4",
53
52
  "prettier": "^3.6.2",
54
- "ts-jest": "^29.3.2",
55
- "ts-node": "^10.9.2",
56
- "tsup": "^8.4.0",
57
- "typescript": "^5.8.3"
53
+ "tsup": "^8.5.0",
54
+ "typescript": "^5.9.3",
55
+ "vitest": "^3.2.4"
58
56
  },
59
57
  "dependencies": {
60
58
  "@js-temporal/polyfill": "^0.5.1"