cronstrue 2.26.0 → 2.28.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
@@ -230,6 +230,7 @@ cronstrue.toString("*/5 * * * *", { locale: "es" }); // => Cada 5 minutos
230
230
  - be - Belarusian ([Kirill Mikulich](https://github.com/KirillMikulich))
231
231
  - hu - Hungarian ([Orcsity Norbert](https://github.com/Northber), Szabó Dániel)
232
232
  - af - Afrikaans (Michael van Niekerk(https://github.com/mvniekerk))
233
+ - vi - Vietnamese ([Nguyen Tan Phap](https://github.com/rikkapro0128))
233
234
 
234
235
  ## License
235
236
 
@@ -409,31 +409,18 @@ var ExpressionDescriptor = (function () {
409
409
  description = this.getSegmentDescription(this.expressionParts[5], this.i18n.commaEveryDay(), function (s, form) {
410
410
  var exp = s;
411
411
  if (s.indexOf("#") > -1) {
412
- exp = s.substr(0, s.indexOf("#"));
412
+ exp = s.substring(0, s.indexOf("#"));
413
413
  }
414
414
  else if (s.indexOf("L") > -1) {
415
415
  exp = exp.replace("L", "");
416
416
  }
417
- return _this.i18n.daysOfTheWeekInCase
417
+ var description = _this.i18n.daysOfTheWeekInCase
418
418
  ? _this.i18n.daysOfTheWeekInCase(form)[parseInt(exp)]
419
419
  : daysOfWeekNames[parseInt(exp)];
420
- }, function (s) {
421
- if (parseInt(s) == 1) {
422
- return "";
423
- }
424
- else {
425
- return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(s), s);
426
- }
427
- }, function (s) {
428
- var beginFrom = s.substring(0, s.indexOf("-"));
429
- var domSpecified = _this.expressionParts[3] != "*";
430
- return domSpecified ? _this.i18n.commaAndX0ThroughX1(beginFrom) : _this.i18n.commaX0ThroughX1(beginFrom);
431
- }, function (s) {
432
- var format = null;
433
420
  if (s.indexOf("#") > -1) {
421
+ var dayOfWeekOfMonthDescription = null;
434
422
  var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
435
423
  var dayOfWeekNumber = s.substring(0, s.indexOf("#"));
436
- var dayOfWeekOfMonthDescription = null;
437
424
  switch (dayOfWeekOfMonthNumber) {
438
425
  case "1":
439
426
  dayOfWeekOfMonthDescription = _this.i18n.first(dayOfWeekNumber);
@@ -451,10 +438,25 @@ var ExpressionDescriptor = (function () {
451
438
  dayOfWeekOfMonthDescription = _this.i18n.fifth(dayOfWeekNumber);
452
439
  break;
453
440
  }
454
- format =
455
- _this.i18n.commaOnThe(dayOfWeekOfMonthNumber) +
456
- dayOfWeekOfMonthDescription +
457
- _this.i18n.spaceX0OfTheMonth();
441
+ description = dayOfWeekOfMonthDescription + " " + description;
442
+ }
443
+ return description;
444
+ }, function (s) {
445
+ if (parseInt(s) == 1) {
446
+ return "";
447
+ }
448
+ else {
449
+ return stringUtilities_1.StringUtilities.format(_this.i18n.commaEveryX0DaysOfTheWeek(s), s);
450
+ }
451
+ }, function (s) {
452
+ var beginFrom = s.substring(0, s.indexOf("-"));
453
+ var domSpecified = _this.expressionParts[3] != "*";
454
+ return domSpecified ? _this.i18n.commaAndX0ThroughX1(beginFrom) : _this.i18n.commaX0ThroughX1(beginFrom);
455
+ }, function (s) {
456
+ var format = null;
457
+ if (s.indexOf("#") > -1) {
458
+ var dayOfWeekOfMonthNumber = s.substring(s.indexOf("#") + 1);
459
+ format = _this.i18n.commaOnThe(dayOfWeekOfMonthNumber).trim() + _this.i18n.spaceX0OfTheMonth();
458
460
  }
459
461
  else if (s.indexOf("L") > -1) {
460
462
  format = _this.i18n.commaOnTheLastX0OfTheMonth(s.replace("L", ""));
@@ -679,7 +681,7 @@ exports.ExpressionDescriptor = ExpressionDescriptor;
679
681
 
680
682
 
681
683
  Object.defineProperty(exports, "__esModule", ({ value: true }));
682
- exports.ar = exports.th = exports.af = exports.hu = exports.be = exports.ca = exports.fa = exports.sw = exports.sl = exports.fi = exports.sk = exports.cs = exports.he = exports.ja = exports.zh_TW = exports.zh_CN = exports.uk = exports.tr = exports.ru = exports.ro = exports.pt_PT = exports.pt_BR = exports.pl = exports.sv = exports.nb = exports.nl = exports.ko = exports.id = exports.it = exports.fr = exports.es = exports.de = exports.da = exports.en = void 0;
684
+ exports.vi = exports.ar = exports.th = exports.af = exports.hu = exports.be = exports.ca = exports.fa = exports.sw = exports.sl = exports.fi = exports.sk = exports.cs = exports.he = exports.ja = exports.zh_TW = exports.zh_CN = exports.uk = exports.tr = exports.ru = exports.ro = exports.pt_PT = exports.pt_BR = exports.pl = exports.sv = exports.nb = exports.nl = exports.ko = exports.id = exports.it = exports.fr = exports.es = exports.de = exports.da = exports.en = void 0;
683
685
  var en_1 = __webpack_require__(751);
684
686
  Object.defineProperty(exports, "en", ({ enumerable: true, get: function () { return en_1.en; } }));
685
687
  var da_1 = __webpack_require__(904);
@@ -748,6 +750,8 @@ var th_1 = __webpack_require__(312);
748
750
  Object.defineProperty(exports, "th", ({ enumerable: true, get: function () { return th_1.th; } }));
749
751
  var ar_1 = __webpack_require__(935);
750
752
  Object.defineProperty(exports, "ar", ({ enumerable: true, get: function () { return ar_1.ar; } }));
753
+ var vi_1 = __webpack_require__(533);
754
+ Object.defineProperty(exports, "vi", ({ enumerable: true, get: function () { return vi_1.vi; } }));
751
755
 
752
756
 
753
757
  /***/ }),
@@ -6751,6 +6755,194 @@ var uk = (function () {
6751
6755
  exports.uk = uk;
6752
6756
 
6753
6757
 
6758
+ /***/ }),
6759
+
6760
+ /***/ 533:
6761
+ /***/ ((__unused_webpack_module, exports) => {
6762
+
6763
+
6764
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
6765
+ exports.vi = void 0;
6766
+ var vi = (function () {
6767
+ function vi() {
6768
+ }
6769
+ vi.prototype.atX0SecondsPastTheMinuteGt20 = function () {
6770
+ return null;
6771
+ };
6772
+ vi.prototype.atX0MinutesPastTheHourGt20 = function () {
6773
+ return null;
6774
+ };
6775
+ vi.prototype.commaMonthX0ThroughMonthX1 = function () {
6776
+ return null;
6777
+ };
6778
+ vi.prototype.commaYearX0ThroughYearX1 = function () {
6779
+ return null;
6780
+ };
6781
+ vi.prototype.use24HourTimeFormatByDefault = function () {
6782
+ return false;
6783
+ };
6784
+ vi.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
6785
+ return "Đã xảy ra lỗi khi tạo mô tả biểu thức. Vui lòng kiểm tra cú pháp biểu thức cron.";
6786
+ };
6787
+ vi.prototype.everyMinute = function () {
6788
+ return "mỗi phút";
6789
+ };
6790
+ vi.prototype.everyHour = function () {
6791
+ return "mỗi giờ";
6792
+ };
6793
+ vi.prototype.atSpace = function () {
6794
+ return "Vào ";
6795
+ };
6796
+ vi.prototype.everyMinuteBetweenX0AndX1 = function () {
6797
+ return "Mỗi phút giữa %s and %s";
6798
+ };
6799
+ vi.prototype.at = function () {
6800
+ return "Vào";
6801
+ };
6802
+ vi.prototype.spaceAnd = function () {
6803
+ return " và";
6804
+ };
6805
+ vi.prototype.everySecond = function () {
6806
+ return "mỗi giây";
6807
+ };
6808
+ vi.prototype.everyX0Seconds = function () {
6809
+ return "mỗi %s giây";
6810
+ };
6811
+ vi.prototype.secondsX0ThroughX1PastTheMinute = function () {
6812
+ return "giây thứ %s qua phút thứ %s";
6813
+ };
6814
+ vi.prototype.atX0SecondsPastTheMinute = function () {
6815
+ return "tại giây thứ %s của mỗi phút";
6816
+ };
6817
+ vi.prototype.everyX0Minutes = function () {
6818
+ return "mỗi %s phút";
6819
+ };
6820
+ vi.prototype.minutesX0ThroughX1PastTheHour = function () {
6821
+ return "phút thứ %s qua %s tiếng";
6822
+ };
6823
+ vi.prototype.atX0MinutesPastTheHour = function () {
6824
+ return "vào %s phút của mỗi tiếng";
6825
+ };
6826
+ vi.prototype.everyX0Hours = function () {
6827
+ return "mỗi %s tiếng";
6828
+ };
6829
+ vi.prototype.betweenX0AndX1 = function () {
6830
+ return "giữa %s và %s";
6831
+ };
6832
+ vi.prototype.atX0 = function () {
6833
+ return "vào %s";
6834
+ };
6835
+ vi.prototype.commaEveryDay = function () {
6836
+ return ", mỗi ngày";
6837
+ };
6838
+ vi.prototype.commaEveryX0DaysOfTheWeek = function () {
6839
+ return ", mỗi %s ngày trong tuần";
6840
+ };
6841
+ vi.prototype.commaX0ThroughX1 = function () {
6842
+ return ", %s đến %s";
6843
+ };
6844
+ vi.prototype.commaAndX0ThroughX1 = function () {
6845
+ return ", %s đến %s";
6846
+ };
6847
+ vi.prototype.first = function () {
6848
+ return "đầu tiên";
6849
+ };
6850
+ vi.prototype.second = function () {
6851
+ return "thứ 2";
6852
+ };
6853
+ vi.prototype.third = function () {
6854
+ return "thứ 3";
6855
+ };
6856
+ vi.prototype.fourth = function () {
6857
+ return "thứ 4";
6858
+ };
6859
+ vi.prototype.fifth = function () {
6860
+ return "thứ 5";
6861
+ };
6862
+ vi.prototype.commaOnThe = function () {
6863
+ return ", trên ";
6864
+ };
6865
+ vi.prototype.spaceX0OfTheMonth = function () {
6866
+ return " %s của tháng";
6867
+ };
6868
+ vi.prototype.lastDay = function () {
6869
+ return "ngày cuối cùng";
6870
+ };
6871
+ vi.prototype.commaOnTheLastX0OfTheMonth = function () {
6872
+ return ", vào ngày %s cuối cùng của tháng";
6873
+ };
6874
+ vi.prototype.commaOnlyOnX0 = function () {
6875
+ return ", chỉ trên %s";
6876
+ };
6877
+ vi.prototype.commaAndOnX0 = function () {
6878
+ return ", và hơn %s";
6879
+ };
6880
+ vi.prototype.commaEveryX0Months = function () {
6881
+ return ", mỗi ngày %s tháng";
6882
+ };
6883
+ vi.prototype.commaOnlyInX0 = function () {
6884
+ return ", chỉ trong %s";
6885
+ };
6886
+ vi.prototype.commaOnTheLastDayOfTheMonth = function () {
6887
+ return ", vào ngày cuối cùng của tháng";
6888
+ };
6889
+ vi.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
6890
+ return ", vào ngày cuối tuần của tháng";
6891
+ };
6892
+ vi.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
6893
+ return ", %s ngày trước ngày cuối cùng của tháng";
6894
+ };
6895
+ vi.prototype.firstWeekday = function () {
6896
+ return "ngày đầu tuần";
6897
+ };
6898
+ vi.prototype.weekdayNearestDayX0 = function () {
6899
+ return "ngày trong tuần ngày gần nhất %s";
6900
+ };
6901
+ vi.prototype.commaOnTheX0OfTheMonth = function () {
6902
+ return ", vào ngày %s của tháng";
6903
+ };
6904
+ vi.prototype.commaEveryX0Days = function () {
6905
+ return ", mỗi %s ngày";
6906
+ };
6907
+ vi.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
6908
+ return ", giữa ngày %s và %s trong tháng";
6909
+ };
6910
+ vi.prototype.commaOnDayX0OfTheMonth = function () {
6911
+ return ", vào %s ngày trong tháng";
6912
+ };
6913
+ vi.prototype.commaEveryHour = function () {
6914
+ return ", mỗi tiếng";
6915
+ };
6916
+ vi.prototype.commaEveryX0Years = function () {
6917
+ return ", mỗi %s năm";
6918
+ };
6919
+ vi.prototype.commaStartingX0 = function () {
6920
+ return ", bắt đầu %s";
6921
+ };
6922
+ vi.prototype.daysOfTheWeek = function () {
6923
+ return ["Chủ nhật", "Thứ 2", "Thứ 3", "Thứ 4", "Thứ 5", "Thứ 6", "Thứ 7"];
6924
+ };
6925
+ vi.prototype.monthsOfTheYear = function () {
6926
+ return [
6927
+ "Tháng 1",
6928
+ "Tháng 2",
6929
+ "Tháng 3",
6930
+ "Tháng 4",
6931
+ "Tháng 5",
6932
+ "Tháng 6",
6933
+ "Tháng 7",
6934
+ "Tháng 8",
6935
+ "Tháng 9",
6936
+ "Tháng 10",
6937
+ "Tháng 11",
6938
+ "Tháng 12",
6939
+ ];
6940
+ };
6941
+ return vi;
6942
+ }());
6943
+ exports.vi = vi;
6944
+
6945
+
6754
6946
  /***/ }),
6755
6947
 
6756
6948
  /***/ 419: