cronstrue 3.2.0 → 3.9.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 +7 -5
- package/dist/cronstrue-i18n.js +207 -3
- package/dist/cronstrue-i18n.min.js +1 -1
- package/dist/cronstrue.js +11 -2
- package/dist/cronstrue.min.js +1 -1
- package/dist/expressionDescriptor.d.ts +1 -1
- package/dist/i18n/allLocales.d.ts +1 -0
- package/dist/i18n/locales/sr.d.ts +55 -0
- package/dist/options.d.ts +1 -0
- package/locales/sr.js +288 -0
- package/locales/sr.min.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -125,6 +125,7 @@ An options object can be passed as the second parameter to `cronstrue.toString`.
|
|
|
125
125
|
- **monthStartIndexZero: boolean** - Whether to interpret January as `0` or `1`. (Default: false)
|
|
126
126
|
- **use24HourTimeFormat: boolean** - If true, descriptions will use a [24-hour clock](https://en.wikipedia.org/wiki/24-hour_clock) (Default: false but some translations will default to true)
|
|
127
127
|
- **locale: string** - The locale to use (Default: "en")
|
|
128
|
+
- **logicalAndDayFields: boolean** - If true, descriptions for cron expressions with both day of month and day of week specified will follow a logical-AND wording rather than logical-OR wording; e.g. "...between day 11 and 17 of the month, only on Friday" rather than "...between day 11 and 17 of the month, and on Friday" (Default: false)
|
|
128
129
|
|
|
129
130
|
## i18n
|
|
130
131
|
|
|
@@ -177,23 +178,23 @@ cronstrue.toString("*/5 * * * *", { locale: "es" }); // => Cada 5 minutos
|
|
|
177
178
|
The following locales can be passed in for the `locale` option. Thank you to the author (shown below) of each translation!
|
|
178
179
|
|
|
179
180
|
- en - English ([Brady Holt](https://github.com/bradymholt))
|
|
180
|
-
- af - Afrikaans (Michael van Niekerk(https://github.com/mvniekerk))
|
|
181
|
+
- af - Afrikaans ([Michael van Niekerk](https://github.com/mvniekerk))
|
|
181
182
|
- ar - Arabic ([Mohamed Nehad Shalabi](https://github.com/mohamednehad450))
|
|
182
183
|
- be - Belarusian ([Kirill Mikulich](https://github.com/KirillMikulich))
|
|
183
184
|
- bg - Bulgarian ([kamenf](https://github.com/kamenf))
|
|
184
185
|
- ca - Catalan ([Francisco Javier Barrena](https://github.com/fjbarrena))
|
|
185
|
-
- hr - Croatian ([Rok Šekoranja](https://github.com/Rookxc))
|
|
186
186
|
- cs - Czech ([hanbar](https://github.com/hanbar))
|
|
187
|
-
- es - Spanish ([Ivan Santos](https://github.com/ivansg))
|
|
188
187
|
- da - Danish ([Rasmus Melchior Jacobsen](https://github.com/rmja))
|
|
189
188
|
- de - German ([Michael Schuler](https://github.com/mschuler))
|
|
189
|
+
- es - Spanish ([Ivan Santos](https://github.com/ivansg))
|
|
190
|
+
- fa - Farsi ([A. Bahrami](https://github.com/alirezakoo))
|
|
190
191
|
- fi - Finnish ([Mikael Rosenberg](https://github.com/MR77FI))
|
|
191
192
|
- fr - French ([Arnaud TAMAILLON](https://github.com/Greybird))
|
|
192
|
-
- fa - Farsi ([A. Bahrami](https://github.com/alirezakoo))
|
|
193
193
|
- he - Hebrew ([Ilan Firsov](https://github.com/IlanF))
|
|
194
|
+
- hr - Croatian ([Rok Šekoranja](https://github.com/Rookxc))
|
|
194
195
|
- hu - Hungarian ([Orcsity Norbert](https://github.com/Northber), Szabó Dániel)
|
|
195
|
-
- it - Italian ([rinaldihno](https://github.com/rinaldihno))
|
|
196
196
|
- id - Indonesia ([Hasan Basri](https://github.com/hasanbasri1993))
|
|
197
|
+
- it - Italian ([rinaldihno](https://github.com/rinaldihno))
|
|
197
198
|
- ja - Japanese ([Alin Sarivan](https://github.com/asarivan))
|
|
198
199
|
- ko - Korean ([Ion Mincu](https://github.com/ionmincu))
|
|
199
200
|
- my - Malay (Malaysia) ([Ikhwan Abdullah](https://github.com/leychay))
|
|
@@ -208,6 +209,7 @@ The following locales can be passed in for the `locale` option. Thank you to th
|
|
|
208
209
|
- sl - Slovenian ([Jani Bevk](https://github.com/jenzy))
|
|
209
210
|
- sw - Swahili ([Leylow Lujuo](https://github.com/leyluj))
|
|
210
211
|
- sv - Swedish ([roobin](https://github.com/roobin))
|
|
212
|
+
- sr - Serbian ([Miloš Paunović](https://github.com/MilosPaunovic))
|
|
211
213
|
- th - Thai ([Teerapat Prommarak](https://github.com/xeusteerapat))
|
|
212
214
|
- tr - Turkish ([Mustafa SADEDİL](https://github.com/sadedil))
|
|
213
215
|
- uk - Ukrainian ([Taras](https://github.com/tbudurovych))
|
package/dist/cronstrue-i18n.js
CHANGED
|
@@ -287,7 +287,7 @@ var ExpressionDescriptor = (function () {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
ExpressionDescriptor.toString = function (expression, _a) {
|
|
290
|
-
var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g;
|
|
290
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.throwExceptionOnParseError, throwExceptionOnParseError = _c === void 0 ? true : _c, _d = _b.verbose, verbose = _d === void 0 ? false : _d, _e = _b.dayOfWeekStartIndexZero, dayOfWeekStartIndexZero = _e === void 0 ? true : _e, _f = _b.monthStartIndexZero, monthStartIndexZero = _f === void 0 ? false : _f, use24HourTimeFormat = _b.use24HourTimeFormat, _g = _b.locale, locale = _g === void 0 ? null : _g, _h = _b.logicalAndDayFields, logicalAndDayFields = _h === void 0 ? false : _h;
|
|
291
291
|
var options = {
|
|
292
292
|
throwExceptionOnParseError: throwExceptionOnParseError,
|
|
293
293
|
verbose: verbose,
|
|
@@ -295,6 +295,7 @@ var ExpressionDescriptor = (function () {
|
|
|
295
295
|
monthStartIndexZero: monthStartIndexZero,
|
|
296
296
|
use24HourTimeFormat: use24HourTimeFormat,
|
|
297
297
|
locale: locale,
|
|
298
|
+
logicalAndDayFields: logicalAndDayFields,
|
|
298
299
|
};
|
|
299
300
|
if (options.tzOffset) {
|
|
300
301
|
console.warn("'tzOffset' option has been deprecated and is no longer supported.");
|
|
@@ -529,7 +530,15 @@ var ExpressionDescriptor = (function () {
|
|
|
529
530
|
}
|
|
530
531
|
else {
|
|
531
532
|
var domSpecified = _this.expressionParts[3] != "*";
|
|
532
|
-
|
|
533
|
+
if (!domSpecified) {
|
|
534
|
+
format = _this.i18n.commaOnlyOnX0(s);
|
|
535
|
+
}
|
|
536
|
+
else if (_this.options.logicalAndDayFields) {
|
|
537
|
+
format = _this.i18n.commaOnlyOnX0(s);
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
format = _this.i18n.commaAndOnX0();
|
|
541
|
+
}
|
|
533
542
|
}
|
|
534
543
|
return format;
|
|
535
544
|
});
|
|
@@ -769,7 +778,7 @@ exports.ExpressionDescriptor = ExpressionDescriptor;
|
|
|
769
778
|
|
|
770
779
|
|
|
771
780
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
772
|
-
exports.hr = exports.bg = exports.my = 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;
|
|
781
|
+
exports.sr = exports.hr = exports.bg = exports.my = 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;
|
|
773
782
|
var en_1 = __webpack_require__(486);
|
|
774
783
|
Object.defineProperty(exports, "en", ({ enumerable: true, get: function () { return en_1.en; } }));
|
|
775
784
|
var da_1 = __webpack_require__(506);
|
|
@@ -846,6 +855,8 @@ var bg_1 = __webpack_require__(622);
|
|
|
846
855
|
Object.defineProperty(exports, "bg", ({ enumerable: true, get: function () { return bg_1.bg; } }));
|
|
847
856
|
var hr_1 = __webpack_require__(131);
|
|
848
857
|
Object.defineProperty(exports, "hr", ({ enumerable: true, get: function () { return hr_1.hr; } }));
|
|
858
|
+
var sr_1 = __webpack_require__(716);
|
|
859
|
+
Object.defineProperty(exports, "sr", ({ enumerable: true, get: function () { return sr_1.sr; } }));
|
|
849
860
|
|
|
850
861
|
|
|
851
862
|
/***/ }),
|
|
@@ -6504,6 +6515,199 @@ var sl = (function () {
|
|
|
6504
6515
|
exports.sl = sl;
|
|
6505
6516
|
|
|
6506
6517
|
|
|
6518
|
+
/***/ }),
|
|
6519
|
+
|
|
6520
|
+
/***/ 716:
|
|
6521
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
6522
|
+
|
|
6523
|
+
|
|
6524
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6525
|
+
exports.sr = void 0;
|
|
6526
|
+
var sr = (function () {
|
|
6527
|
+
function sr() {
|
|
6528
|
+
}
|
|
6529
|
+
sr.prototype.use24HourTimeFormatByDefault = function () {
|
|
6530
|
+
return true;
|
|
6531
|
+
};
|
|
6532
|
+
sr.prototype.anErrorOccuredWhenGeneratingTheExpressionD = function () {
|
|
6533
|
+
return "Došlo je do greške pri generisanju izraza. Proverite sintaksu cron izraza.";
|
|
6534
|
+
};
|
|
6535
|
+
sr.prototype.at = function () {
|
|
6536
|
+
return "U";
|
|
6537
|
+
};
|
|
6538
|
+
sr.prototype.atSpace = function () {
|
|
6539
|
+
return "U ";
|
|
6540
|
+
};
|
|
6541
|
+
sr.prototype.atX0 = function () {
|
|
6542
|
+
return "u %s";
|
|
6543
|
+
};
|
|
6544
|
+
sr.prototype.atX0MinutesPastTheHour = function () {
|
|
6545
|
+
return "u %s minuta posle punog sata";
|
|
6546
|
+
};
|
|
6547
|
+
sr.prototype.atX0SecondsPastTheMinute = function () {
|
|
6548
|
+
return "u %s sekundi posle pune minute";
|
|
6549
|
+
};
|
|
6550
|
+
sr.prototype.betweenX0AndX1 = function () {
|
|
6551
|
+
return "između %s i %s";
|
|
6552
|
+
};
|
|
6553
|
+
sr.prototype.commaBetweenDayX0AndX1OfTheMonth = function () {
|
|
6554
|
+
return ", između %s. i %s. dana u mesecu";
|
|
6555
|
+
};
|
|
6556
|
+
sr.prototype.commaEveryDay = function () {
|
|
6557
|
+
return ", svaki dan";
|
|
6558
|
+
};
|
|
6559
|
+
sr.prototype.commaEveryX0Days = function () {
|
|
6560
|
+
return ", svakih %s dana";
|
|
6561
|
+
};
|
|
6562
|
+
sr.prototype.commaEveryX0DaysOfTheWeek = function () {
|
|
6563
|
+
return ", svakih %s dana u nedelji";
|
|
6564
|
+
};
|
|
6565
|
+
sr.prototype.commaEveryX0Months = function () {
|
|
6566
|
+
return ", svakih %s meseci";
|
|
6567
|
+
};
|
|
6568
|
+
sr.prototype.commaEveryX0Years = function () {
|
|
6569
|
+
return ", svakih %s godina";
|
|
6570
|
+
};
|
|
6571
|
+
sr.prototype.commaOnDayX0OfTheMonth = function () {
|
|
6572
|
+
return ", %s. dan u mesecu";
|
|
6573
|
+
};
|
|
6574
|
+
sr.prototype.commaOnlyInX0 = function () {
|
|
6575
|
+
return ", samo u %s";
|
|
6576
|
+
};
|
|
6577
|
+
sr.prototype.commaOnlyOnX0 = function () {
|
|
6578
|
+
return ", samo %s";
|
|
6579
|
+
};
|
|
6580
|
+
sr.prototype.commaAndOnX0 = function () {
|
|
6581
|
+
return ", i %s";
|
|
6582
|
+
};
|
|
6583
|
+
sr.prototype.commaOnThe = function () {
|
|
6584
|
+
return ", ";
|
|
6585
|
+
};
|
|
6586
|
+
sr.prototype.commaOnTheLastDayOfTheMonth = function () {
|
|
6587
|
+
return ", poslednjeg dana u mesecu";
|
|
6588
|
+
};
|
|
6589
|
+
sr.prototype.commaOnTheLastWeekdayOfTheMonth = function () {
|
|
6590
|
+
return ", poslednjeg radnog dana u mesecu";
|
|
6591
|
+
};
|
|
6592
|
+
sr.prototype.commaDaysBeforeTheLastDayOfTheMonth = function () {
|
|
6593
|
+
return ", %s dana pre kraja meseca";
|
|
6594
|
+
};
|
|
6595
|
+
sr.prototype.commaOnTheLastX0OfTheMonth = function () {
|
|
6596
|
+
return ", poslednji %s u mesecu";
|
|
6597
|
+
};
|
|
6598
|
+
sr.prototype.commaOnTheX0OfTheMonth = function () {
|
|
6599
|
+
return ", %s u mesecu";
|
|
6600
|
+
};
|
|
6601
|
+
sr.prototype.commaX0ThroughX1 = function () {
|
|
6602
|
+
return ", od %s do %s";
|
|
6603
|
+
};
|
|
6604
|
+
sr.prototype.commaAndX0ThroughX1 = function () {
|
|
6605
|
+
return ", i od %s do %s";
|
|
6606
|
+
};
|
|
6607
|
+
sr.prototype.everyHour = function () {
|
|
6608
|
+
return "svaki sat";
|
|
6609
|
+
};
|
|
6610
|
+
sr.prototype.everyMinute = function () {
|
|
6611
|
+
return "svakog minuta";
|
|
6612
|
+
};
|
|
6613
|
+
sr.prototype.everyMinuteBetweenX0AndX1 = function () {
|
|
6614
|
+
return "Svakog minuta između %s i %s";
|
|
6615
|
+
};
|
|
6616
|
+
sr.prototype.everySecond = function () {
|
|
6617
|
+
return "svake sekunde";
|
|
6618
|
+
};
|
|
6619
|
+
sr.prototype.everyX0Hours = function () {
|
|
6620
|
+
return "svakih %s sati";
|
|
6621
|
+
};
|
|
6622
|
+
sr.prototype.everyX0Minutes = function () {
|
|
6623
|
+
return "svakih %s minuta";
|
|
6624
|
+
};
|
|
6625
|
+
sr.prototype.everyX0Seconds = function () {
|
|
6626
|
+
return "svakih %s sekundi";
|
|
6627
|
+
};
|
|
6628
|
+
sr.prototype.fifth = function () {
|
|
6629
|
+
return "peti";
|
|
6630
|
+
};
|
|
6631
|
+
sr.prototype.first = function () {
|
|
6632
|
+
return "prvi";
|
|
6633
|
+
};
|
|
6634
|
+
sr.prototype.firstWeekday = function () {
|
|
6635
|
+
return "prvi radni dan";
|
|
6636
|
+
};
|
|
6637
|
+
sr.prototype.fourth = function () {
|
|
6638
|
+
return "četvrti";
|
|
6639
|
+
};
|
|
6640
|
+
sr.prototype.minutesX0ThroughX1PastTheHour = function () {
|
|
6641
|
+
return "minute od %s do %s posle punog sata";
|
|
6642
|
+
};
|
|
6643
|
+
sr.prototype.second = function () {
|
|
6644
|
+
return "drugi";
|
|
6645
|
+
};
|
|
6646
|
+
sr.prototype.secondsX0ThroughX1PastTheMinute = function () {
|
|
6647
|
+
return "sekunde od %s do %s posle pune minute";
|
|
6648
|
+
};
|
|
6649
|
+
sr.prototype.spaceAnd = function () {
|
|
6650
|
+
return " i";
|
|
6651
|
+
};
|
|
6652
|
+
sr.prototype.spaceX0OfTheMonth = function () {
|
|
6653
|
+
return " %s u mesecu";
|
|
6654
|
+
};
|
|
6655
|
+
sr.prototype.lastDay = function () {
|
|
6656
|
+
return "poslednji dan";
|
|
6657
|
+
};
|
|
6658
|
+
sr.prototype.third = function () {
|
|
6659
|
+
return "treći";
|
|
6660
|
+
};
|
|
6661
|
+
sr.prototype.weekdayNearestDayX0 = function () {
|
|
6662
|
+
return "radni dan najbliži %s. danu";
|
|
6663
|
+
};
|
|
6664
|
+
sr.prototype.commaMonthX0ThroughMonthX1 = function () {
|
|
6665
|
+
return null;
|
|
6666
|
+
};
|
|
6667
|
+
sr.prototype.commaYearX0ThroughYearX1 = function () {
|
|
6668
|
+
return null;
|
|
6669
|
+
};
|
|
6670
|
+
sr.prototype.atX0MinutesPastTheHourGt20 = function () {
|
|
6671
|
+
return null;
|
|
6672
|
+
};
|
|
6673
|
+
sr.prototype.atX0SecondsPastTheMinuteGt20 = function () {
|
|
6674
|
+
return null;
|
|
6675
|
+
};
|
|
6676
|
+
sr.prototype.commaStartingX0 = function () {
|
|
6677
|
+
return ", počevši od %s";
|
|
6678
|
+
};
|
|
6679
|
+
sr.prototype.daysOfTheWeek = function () {
|
|
6680
|
+
return [
|
|
6681
|
+
"Nedelja",
|
|
6682
|
+
"Ponedeljak",
|
|
6683
|
+
"Utorak",
|
|
6684
|
+
"Sreda",
|
|
6685
|
+
"Četvrtak",
|
|
6686
|
+
"Petak",
|
|
6687
|
+
"Subota",
|
|
6688
|
+
];
|
|
6689
|
+
};
|
|
6690
|
+
sr.prototype.monthsOfTheYear = function () {
|
|
6691
|
+
return [
|
|
6692
|
+
"januar",
|
|
6693
|
+
"februar",
|
|
6694
|
+
"mart",
|
|
6695
|
+
"april",
|
|
6696
|
+
"maj",
|
|
6697
|
+
"jun",
|
|
6698
|
+
"jul",
|
|
6699
|
+
"avgust",
|
|
6700
|
+
"septembar",
|
|
6701
|
+
"oktobar",
|
|
6702
|
+
"novembar",
|
|
6703
|
+
"decembar",
|
|
6704
|
+
];
|
|
6705
|
+
};
|
|
6706
|
+
return sr;
|
|
6707
|
+
}());
|
|
6708
|
+
exports.sr = sr;
|
|
6709
|
+
|
|
6710
|
+
|
|
6507
6711
|
/***/ }),
|
|
6508
6712
|
|
|
6509
6713
|
/***/ 544:
|