cronstrue 3.49.0 → 3.51.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.
@@ -563,6 +563,17 @@ var ExpressionDescriptor = (function () {
563
563
  return format;
564
564
  },
565
565
  });
566
+ var firstItem = dayOfWeekItems[0];
567
+ var isListWithStep = dayOfWeekItems.length > 1 && dayOfWeekExpression.indexOf("/") > -1;
568
+ var firstStep = firstItem.split("/")[1];
569
+ if (isListWithStep &&
570
+ andPrefix_1 &&
571
+ description &&
572
+ this.expressionParts[3] != "*" &&
573
+ !this.options.logicalAndDayFields &&
574
+ (firstStep === undefined ? firstItem.indexOf("-") > -1 : parseInt(firstStep) != 1)) {
575
+ description = andPrefix_1 + ExpressionDescriptor.removeLeadingComma(description);
576
+ }
566
577
  }
567
578
  return description;
568
579
  };
@@ -721,9 +732,9 @@ var ExpressionDescriptor = (function () {
721
732
  descriptionContent += conjunction == "," && segments.length > 2 ? " " : "".concat(conjunction, " ");
722
733
  }
723
734
  if (segments[i].indexOf("/") > -1 || segments[i].indexOf("-") > -1) {
724
- var isSegmentRangeWithoutIncrement = segments[i].indexOf("-") > -1 && segments[i].indexOf("/") == -1;
725
- var currentDescriptionContent = this.getSegmentDescription(segments[i], isSegmentRangeWithoutIncrement ? __assign(__assign({}, itemDescribers), { range: this.i18n.commaX0ThroughX1 }) : itemDescribers);
726
- if (isSegmentRangeWithoutIncrement || i > 0) {
735
+ var isBareRange = !doesExpressionContainIncrement && segments[i].indexOf("-") > -1 && segments[i].indexOf("/") == -1;
736
+ var currentDescriptionContent = this.getSegmentDescription(segments[i], isBareRange ? __assign(__assign({}, itemDescribers), { range: this.i18n.commaX0ThroughX1 }) : itemDescribers);
737
+ if (isBareRange || i > 0) {
727
738
  currentDescriptionContent = ExpressionDescriptor.removeLeadingComma(currentDescriptionContent);
728
739
  }
729
740
  descriptionContent += currentDescriptionContent;