rrule-temporal 1.1.0 → 1.1.2

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/totext.js CHANGED
@@ -1,18 +1,10 @@
1
1
  import {
2
2
  RRuleTemporal
3
- } from "./chunk-6VZV7PDA.js";
3
+ } from "./chunk-6A2XASAM.js";
4
4
 
5
5
  // src/totext.ts
6
6
  var en = {
7
- weekdayNames: [
8
- "Monday",
9
- "Tuesday",
10
- "Wednesday",
11
- "Thursday",
12
- "Friday",
13
- "Saturday",
14
- "Sunday"
15
- ],
7
+ weekdayNames: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
16
8
  monthNames: [
17
9
  "January",
18
10
  "February",
@@ -179,20 +171,7 @@ var hi = {
179
171
  };
180
172
  var yue = {
181
173
  weekdayNames: ["\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D", "\u661F\u671F\u65E5"],
182
- monthNames: [
183
- "\u4E00\u6708",
184
- "\u4E8C\u6708",
185
- "\u4E09\u6708",
186
- "\u56DB\u6708",
187
- "\u4E94\u6708",
188
- "\u516D\u6708",
189
- "\u4E03\u6708",
190
- "\u516B\u6708",
191
- "\u4E5D\u6708",
192
- "\u5341\u6708",
193
- "\u5341\u4E00\u6708",
194
- "\u5341\u4E8C\u6708"
195
- ],
174
+ monthNames: ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"],
196
175
  units: {
197
176
  year: { singular: "\u5E74", plural: "\u5E74" },
198
177
  month: { singular: "\u6708", plural: "\u6708" },
@@ -232,15 +211,7 @@ var yue = {
232
211
  ordinal: (n) => n < 0 ? "\u6700\u5F8C" : `\u7B2C${Math.abs(n)}`
233
212
  };
234
213
  var ar = {
235
- weekdayNames: [
236
- "\u0627\u0644\u0627\u062B\u0646\u064A\u0646",
237
- "\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621",
238
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
239
- "\u0627\u0644\u062E\u0645\u064A\u0633",
240
- "\u0627\u0644\u062C\u0645\u0639\u0629",
241
- "\u0627\u0644\u0633\u0628\u062A",
242
- "\u0627\u0644\u0623\u062D\u062F"
243
- ],
214
+ weekdayNames: ["\u0627\u0644\u0627\u062B\u0646\u064A\u0646", "\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062E\u0645\u064A\u0633", "\u0627\u0644\u062C\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062A", "\u0627\u0644\u0623\u062D\u062F"],
244
215
  monthNames: [
245
216
  "\u064A\u0646\u0627\u064A\u0631",
246
217
  "\u0641\u0628\u0631\u0627\u064A\u0631",
@@ -313,15 +284,7 @@ var ar = {
313
284
  }
314
285
  };
315
286
  var he = {
316
- weekdayNames: [
317
- "\u05D9\u05D5\u05DD \u05E9\u05E0\u05D9",
318
- "\u05D9\u05D5\u05DD \u05E9\u05DC\u05D9\u05E9\u05D9",
319
- "\u05D9\u05D5\u05DD \u05E8\u05D1\u05D9\u05E2\u05D9",
320
- "\u05D9\u05D5\u05DD \u05D7\u05DE\u05D9\u05E9\u05D9",
321
- "\u05D9\u05D5\u05DD \u05E9\u05D9\u05E9\u05D9",
322
- "\u05D9\u05D5\u05DD \u05E9\u05D1\u05EA",
323
- "\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF"
324
- ],
287
+ weekdayNames: ["\u05D9\u05D5\u05DD \u05E9\u05E0\u05D9", "\u05D9\u05D5\u05DD \u05E9\u05DC\u05D9\u05E9\u05D9", "\u05D9\u05D5\u05DD \u05E8\u05D1\u05D9\u05E2\u05D9", "\u05D9\u05D5\u05DD \u05D7\u05DE\u05D9\u05E9\u05D9", "\u05D9\u05D5\u05DD \u05E9\u05D9\u05E9\u05D9", "\u05D9\u05D5\u05DD \u05E9\u05D1\u05EA", "\u05D9\u05D5\u05DD \u05E8\u05D0\u05E9\u05D5\u05DF"],
325
288
  monthNames: [
326
289
  "\u05D9\u05E0\u05D5\u05D0\u05E8",
327
290
  "\u05E4\u05D1\u05E8\u05D5\u05D0\u05E8",
@@ -395,20 +358,7 @@ var he = {
395
358
  };
396
359
  var zh = {
397
360
  weekdayNames: ["\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D", "\u661F\u671F\u65E5"],
398
- monthNames: [
399
- "\u4E00\u6708",
400
- "\u4E8C\u6708",
401
- "\u4E09\u6708",
402
- "\u56DB\u6708",
403
- "\u4E94\u6708",
404
- "\u516D\u6708",
405
- "\u4E03\u6708",
406
- "\u516B\u6708",
407
- "\u4E5D\u6708",
408
- "\u5341\u6708",
409
- "\u5341\u4E00\u6708",
410
- "\u5341\u4E8C\u6708"
411
- ],
361
+ monthNames: ["\u4E00\u6708", "\u4E8C\u6708", "\u4E09\u6708", "\u56DB\u6708", "\u4E94\u6708", "\u516D\u6708", "\u4E03\u6708", "\u516B\u6708", "\u4E5D\u6708", "\u5341\u6708", "\u5341\u4E00\u6708", "\u5341\u4E8C\u6708"],
412
362
  units: {
413
363
  year: { singular: "\u5E74", plural: "\u5E74" },
414
364
  month: { singular: "\u6708", plural: "\u6708" },
@@ -558,28 +508,46 @@ function toText(input, locale) {
558
508
  }
559
509
  }
560
510
  if (freq === "WEEKLY" && byDay && !isWeekdays && !isEveryday) {
561
- parts.push(data.words.on, list(byDay, (t) => formatByDayToken(t, data), data.words.and));
511
+ parts.push(
512
+ data.words.on,
513
+ list(byDay, (t) => formatByDayToken(t, data), data.words.and)
514
+ );
562
515
  } else if (byDay && freq !== "WEEKLY") {
563
- parts.push(data.words.on, list(byDay, (t) => formatByDayToken(t, data), data.words.and));
516
+ parts.push(
517
+ data.words.on,
518
+ list(byDay, (t) => formatByDayToken(t, data), data.words.and)
519
+ );
564
520
  }
565
521
  if (byMonth) {
566
- parts.push(data.words.in, list(byMonth, (m) => data.monthNames[m - 1], data.words.and));
522
+ parts.push(
523
+ data.words.in,
524
+ list(byMonth, (m) => data.monthNames[m - 1], data.words.and)
525
+ );
567
526
  }
568
527
  if (byMonthDay) {
569
- parts.push(data.words.on_the, list(byMonthDay, (d) => ordinal(d, data), data.words.and), data.words.day_of_month);
528
+ parts.push(
529
+ data.words.on_the,
530
+ list(byMonthDay, (d) => ordinal(d, data), data.words.and),
531
+ data.words.day_of_month
532
+ );
570
533
  }
571
534
  if (byYearDay) {
572
- parts.push(data.words.on_the, list(byYearDay, (d) => ordinal(d, data), data.words.and), data.words.day_of_year);
535
+ parts.push(
536
+ data.words.on_the,
537
+ list(byYearDay, (d) => ordinal(d, data), data.words.and),
538
+ data.words.day_of_year
539
+ );
573
540
  }
574
541
  if (byWeekNo) {
575
- parts.push(data.words.in_week, list(byWeekNo, (n) => n.toString(), data.words.and));
542
+ parts.push(
543
+ data.words.in_week,
544
+ list(byWeekNo, (n) => n.toString(), data.words.and)
545
+ );
576
546
  }
577
547
  if (byHour) {
578
548
  const minutes = byMinute != null ? byMinute : [0];
579
549
  const seconds = bySecond != null ? bySecond : [0];
580
- const times = byHour.flatMap(
581
- (h) => minutes.flatMap((m) => seconds.map((s) => formatTime(h, m, s)))
582
- );
550
+ const times = byHour.flatMap((h) => minutes.flatMap((m) => seconds.map((s) => formatTime(h, m, s))));
583
551
  parts.push(data.words.at, list(times, void 0, data.words.and));
584
552
  parts.push(tzAbbreviation(opts.dtstart));
585
553
  }
@@ -596,14 +564,22 @@ function toText(input, locale) {
596
564
  parts.push(data.words.for, count.toString(), count === 1 ? data.words.time : data.words.times);
597
565
  }
598
566
  if (bySetPos) {
599
- parts.push(data.words.on_the, list(bySetPos, (n) => ordinal(n, data), data.words.and), data.words.instance);
567
+ parts.push(
568
+ data.words.on_the,
569
+ list(bySetPos, (n) => ordinal(n, data), data.words.and),
570
+ data.words.instance
571
+ );
600
572
  }
601
573
  if (wkst) {
602
574
  const wkName = formatByDayToken(wkst, data);
603
575
  parts.push(data.words.week_starts_on, wkName);
604
576
  }
605
577
  if (rDate && rDate.length) {
606
- parts.push(data.words.with, `${rDate.length}`, rDate.length === 1 ? data.words.additional_date : data.words.additional_dates);
578
+ parts.push(
579
+ data.words.with,
580
+ `${rDate.length}`,
581
+ rDate.length === 1 ? data.words.additional_date : data.words.additional_dates
582
+ );
607
583
  }
608
584
  if (exDate && exDate.length) {
609
585
  parts.push(data.words.excluding, `${exDate.length}`, exDate.length === 1 ? data.words.date : data.words.dates);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-temporal",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Recurrence rule processing using Temporal PlainDate/PlainDateTime",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "build": "tsup",
22
22
  "test": "jest --coverage=false",
23
23
  "coverage": "jest",
24
- "format": "./node_modules/.bin/prettier --write 'src/tests/*.ts'",
24
+ "format": "./node_modules/.bin/prettier --write 'src/**/*.ts'",
25
25
  "prepare": "npm run build"
26
26
  },
27
27
  "repository": {