cronstrue 3.51.0 → 3.52.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/dist/cronstrue-i18n.js +12 -2
- package/dist/cronstrue-i18n.min.js +1 -1
- package/dist/cronstrue.js +12 -2
- package/dist/cronstrue.min.js +1 -1
- package/package.json +1 -1
package/dist/cronstrue-i18n.js
CHANGED
|
@@ -503,6 +503,14 @@ var ExpressionDescriptor = (function () {
|
|
|
503
503
|
var stepSegments = dayOfWeekExpression.split("/");
|
|
504
504
|
var hasStep_1 = stepSegments.length > 1 && parseInt(stepSegments[1]) != 1;
|
|
505
505
|
var andPrefix_1 = this.getAndPrefix();
|
|
506
|
+
var isListWithStep = dayOfWeekItems.length > 1 && dayOfWeekExpression.indexOf("/") > -1;
|
|
507
|
+
var andWord_1 = andPrefix_1 ? ExpressionDescriptor.removeLeadingComma(andPrefix_1).trim() : "";
|
|
508
|
+
var dayWithAnd_1 = ExpressionDescriptor.removeLeadingComma(this.i18n.commaAndOnX0()).replace(/^\s+/, "");
|
|
509
|
+
var dropsDayAnd_1 = isListWithStep &&
|
|
510
|
+
this.expressionParts[3] != "*" &&
|
|
511
|
+
!this.options.logicalAndDayFields &&
|
|
512
|
+
!!andWord_1 &&
|
|
513
|
+
dayWithAnd_1.indexOf(andWord_1 + " ") == 0;
|
|
506
514
|
description = this.getSegmentDescription(dayOfWeekExpression, {
|
|
507
515
|
all: this.i18n.commaEveryDay(),
|
|
508
516
|
single: function (s, form) {
|
|
@@ -556,6 +564,9 @@ var ExpressionDescriptor = (function () {
|
|
|
556
564
|
else if (_this.options.logicalAndDayFields) {
|
|
557
565
|
format = _this.i18n.commaOnlyOnX0(s);
|
|
558
566
|
}
|
|
567
|
+
else if (dropsDayAnd_1) {
|
|
568
|
+
format = dayWithAnd_1.substring(andWord_1.length).replace(/^\s+/, "");
|
|
569
|
+
}
|
|
559
570
|
else {
|
|
560
571
|
format = _this.i18n.commaAndOnX0();
|
|
561
572
|
}
|
|
@@ -564,14 +575,13 @@ var ExpressionDescriptor = (function () {
|
|
|
564
575
|
},
|
|
565
576
|
});
|
|
566
577
|
var firstItem = dayOfWeekItems[0];
|
|
567
|
-
var isListWithStep = dayOfWeekItems.length > 1 && dayOfWeekExpression.indexOf("/") > -1;
|
|
568
578
|
var firstStep = firstItem.split("/")[1];
|
|
569
579
|
if (isListWithStep &&
|
|
570
580
|
andPrefix_1 &&
|
|
571
581
|
description &&
|
|
572
582
|
this.expressionParts[3] != "*" &&
|
|
573
583
|
!this.options.logicalAndDayFields &&
|
|
574
|
-
(firstStep === undefined ? firstItem.indexOf("-") > -1 : parseInt(firstStep) != 1)) {
|
|
584
|
+
(firstStep === undefined ? firstItem.indexOf("-") > -1 || dropsDayAnd_1 : parseInt(firstStep) != 1)) {
|
|
575
585
|
description = andPrefix_1 + ExpressionDescriptor.removeLeadingComma(description);
|
|
576
586
|
}
|
|
577
587
|
}
|