cronstrue 3.38.0 → 3.39.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.
@@ -472,15 +472,26 @@ var ExpressionDescriptor = (function () {
472
472
  }, { min: 0, max: 23 });
473
473
  return description;
474
474
  };
475
- ExpressionDescriptor.prototype.getDayOfWeekDescription = function () {
475
+ ExpressionDescriptor.prototype.getDayOfWeekDescription = function (dayOfWeekExpression) {
476
476
  var _this = this;
477
+ var _a, _b;
478
+ if (dayOfWeekExpression === void 0) { dayOfWeekExpression = this.expressionParts[5]; }
477
479
  var daysOfWeekNames = this.i18n.daysOfTheWeek();
478
480
  var description = null;
479
- if (this.expressionParts[5] == "*") {
481
+ if (dayOfWeekExpression == "*") {
480
482
  description = "";
481
483
  }
482
484
  else {
483
- description = this.getSegmentDescription(this.expressionParts[5], this.i18n.commaEveryDay(), function (s, form) {
485
+ var dayOfWeekItems = dayOfWeekExpression.split(",");
486
+ var lastItems = dayOfWeekItems.filter(function (s) { return s.indexOf("L") > -1; });
487
+ var otherItems = dayOfWeekItems.filter(function (s) { return s.indexOf("L") === -1; });
488
+ if (lastItems.length > 0 && otherItems.length > 0) {
489
+ var lastDescription = (_a = this.getDayOfWeekDescription(lastItems.join(","))) !== null && _a !== void 0 ? _a : "";
490
+ return (((_b = this.getDayOfWeekDescription(otherItems.join(","))) !== null && _b !== void 0 ? _b : "") +
491
+ "".concat(this.i18n.spaceAnd(), " ") +
492
+ (lastDescription.startsWith(", ") ? lastDescription.substring(2) : lastDescription));
493
+ }
494
+ description = this.getSegmentDescription(dayOfWeekExpression, this.i18n.commaEveryDay(), function (s, form) {
484
495
  var exp = s;
485
496
  if (s.indexOf("#") > -1) {
486
497
  exp = s.substring(0, s.indexOf("#"));
@@ -805,9 +816,9 @@ var ExpressionDescriptor = (function () {
805
816
  };
806
817
  ExpressionDescriptor.prototype.transformVerbosity = function (description, useVerboseFormat) {
807
818
  if (!useVerboseFormat) {
808
- description = description.replace(new RegExp(", ".concat(this.i18n.everyMinute()), "g"), "");
809
- description = description.replace(new RegExp(", ".concat(this.i18n.everyHour()), "g"), "");
810
- description = description.replace(new RegExp(this.i18n.commaEveryDay(), "g"), "");
819
+ description = description.replace(new RegExp(", ".concat(this.i18n.everyMinute(), "(?!\\s*[\\p{L}\\p{N}])"), "gu"), "");
820
+ description = description.replace(new RegExp(", ".concat(this.i18n.everyHour(), "(?!\\s*[\\p{L}\\p{N}])"), "gu"), "");
821
+ description = description.replace(new RegExp("".concat(this.i18n.commaEveryDay(), "(?!\\s*[\\p{L}\\p{N}])"), "gu"), "");
811
822
  description = description.replace(/\, ?$/, "");
812
823
  if (this.i18n.conciseVerbosityReplacements) {
813
824
  for (var _i = 0, _a = Object.entries(this.i18n.conciseVerbosityReplacements()); _i < _a.length; _i++) {
@@ -3269,7 +3280,7 @@ var fa = (function () {
3269
3280
  return "آخرین روز";
3270
3281
  };
3271
3282
  fa.prototype.commaOnTheLastX0OfTheMonth = function () {
3272
- return ", در %s ماه";
3283
+ return ", در آخرین %s ماه";
3273
3284
  };
3274
3285
  fa.prototype.commaOnlyOnX0 = function () {
3275
3286
  return ", فقط در %s";
@@ -3287,13 +3298,13 @@ var fa = (function () {
3287
3298
  return ", در آخرین روز ماه";
3288
3299
  };
3289
3300
  fa.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
3290
- return ", در آخرین روز ماه";
3301
+ return ", در آخرین روز کاری ماه";
3291
3302
  };
3292
3303
  fa.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
3293
3304
  return ", %s روز قبل از آخرین روز ماه";
3294
3305
  };
3295
3306
  fa.prototype.firstWeekday = function () {
3296
- return "اولین روز";
3307
+ return "اولین روز کاری";
3297
3308
  };
3298
3309
  fa.prototype.weekdayNearestDayX0 = function () {
3299
3310
  return "روز نزدیک به روز %s";
@@ -3855,7 +3866,7 @@ var he = (function () {
3855
3866
  return "היום האחרון";
3856
3867
  };
3857
3868
  he.prototype.commaOnTheLastX0OfTheMonth = function () {
3858
- return ", רק ב %s של החודש";
3869
+ return ", ב%s האחרון של החודש";
3859
3870
  };
3860
3871
  he.prototype.commaOnlyOnX0 = function () {
3861
3872
  return ", רק ב %s";
@@ -4590,7 +4601,7 @@ var it = (function () {
4590
4601
  return ", l'ultimo giorno del mese";
4591
4602
  };
4592
4603
  it.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
4593
- return ", nell'ultima settimana del mese";
4604
+ return ", l'ultimo giorno feriale del mese";
4594
4605
  };
4595
4606
  it.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
4596
4607
  return ", %s giorni prima dell'ultimo giorno del mese";
@@ -5215,7 +5226,7 @@ var my = (function () {
5215
5226
  return ", pada hari terakhir bulan";
5216
5227
  };
5217
5228
  my.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
5218
- return ", pada minggu terakhir bulan";
5229
+ return ", pada hari bekerja terakhir bulan";
5219
5230
  };
5220
5231
  my.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
5221
5232
  return ", %s hari sebelum hari terakhir bulan";
@@ -7741,7 +7752,7 @@ var sw = (function () {
7741
7752
  return "siku ya mwisho";
7742
7753
  };
7743
7754
  sw.prototype.commaOnTheLastX0OfTheMonth = function () {
7744
- return ", siku ya %s ya mwezi";
7755
+ return ", %s ya mwisho ya mwezi";
7745
7756
  };
7746
7757
  sw.prototype.commaOnlyOnX0 = function () {
7747
7758
  return ", kwa %s tu";
@@ -7759,7 +7770,7 @@ var sw = (function () {
7759
7770
  return ", siku ya mwisho wa mwezi";
7760
7771
  };
7761
7772
  sw.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
7762
- return ", wikendi ya mwisho wa mwezi";
7773
+ return ", siku ya kazi ya mwisho wa mwezi";
7763
7774
  };
7764
7775
  sw.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
7765
7776
  return ", siku ya %s kabla ya siku ya mwisho wa mwezi";
@@ -8378,7 +8389,7 @@ var tr = (function () {
8378
8389
  return "ilk iş günü";
8379
8390
  };
8380
8391
  tr.prototype.weekdayNearestDayX0 = function () {
8381
- return "%s. günü sonrasındaki ilk iş günü";
8392
+ return "%s. gününe en yakın iş günü";
8382
8393
  };
8383
8394
  tr.prototype.commaOnTheX0OfTheMonth = function () {
8384
8395
  return ", ayın %s";
@@ -8751,19 +8762,19 @@ var vi = (function () {
8751
8762
  return ", vào ngày cuối cùng của tháng";
8752
8763
  };
8753
8764
  vi.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
8754
- return ", vào ngày cuối tuần của tháng";
8765
+ return ", vào ngày làm việc cuối cùng của tháng";
8755
8766
  };
8756
8767
  vi.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
8757
8768
  return ", %s ngày trước ngày cuối cùng của tháng";
8758
8769
  };
8759
8770
  vi.prototype.firstWeekday = function () {
8760
- return "ngày đầu tuần";
8771
+ return "ngày làm việc đầu tiên";
8761
8772
  };
8762
8773
  vi.prototype.weekdayNearestDayX0 = function () {
8763
- return "ngày trong tuần ngày gần nhất %s";
8774
+ return "ngày làm việc gần ngày %s nhất";
8764
8775
  };
8765
8776
  vi.prototype.commaOnTheX0OfTheMonth = function () {
8766
- return ", vào ngày %s của tháng";
8777
+ return ", vào %s của tháng";
8767
8778
  };
8768
8779
  vi.prototype.commaEveryX0Days = function () {
8769
8780
  return ", mỗi %s ngày";
@@ -8963,7 +8974,7 @@ var zh_CN = (function () {
8963
8974
  return ", 限每月的最后一个工作日";
8964
8975
  };
8965
8976
  zh_CN.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
8966
- return ", 限每月最后%s天";
8977
+ return ", 限每月最后一天之前的第%s天";
8967
8978
  };
8968
8979
  zh_CN.prototype.firstWeekday = function () {
8969
8980
  return "第一个工作日";
@@ -9150,7 +9161,7 @@ var zh_TW = (function () {
9150
9161
  return ", 每月的最後一個工作日";
9151
9162
  };
9152
9163
  zh_TW.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
9153
- return ", %s 這個月的最後一天的前幾天";
9164
+ return ", 每月最後一天之前的第 %s 天";
9154
9165
  };
9155
9166
  zh_TW.prototype.firstWeekday = function () {
9156
9167
  return "第一個工作日";