diff --git a/src/main/java/com/cronutils/descriptor/DescriptionStrategy.java b/src/main/java/com/cronutils/descriptor/DescriptionStrategy.java index d6521496..56f23bcc 100755 --- a/src/main/java/com/cronutils/descriptor/DescriptionStrategy.java +++ b/src/main/java/com/cronutils/descriptor/DescriptionStrategy.java @@ -212,7 +212,11 @@ private StringBuilder createAndDescription(final StringBuilder builder, final Li if (!builder.toString().startsWith(bundle.getString("at"))) { builder.append(String.format(" %s ", bundle.getString("and"))); } else { - builder.append(" "); + if (builder.toString().equals(bundle.getString("at"))) { + builder.insert(0, "Every second "); + } else { + builder.append(" "); + } } builder.append(describe(expressions.get(expressions.size() - 1), true)); return builder; diff --git a/src/test/java/com/cronutils/Issue440Test.java b/src/test/java/com/cronutils/Issue440Test.java index 4aed2095..19d1614d 100644 --- a/src/test/java/com/cronutils/Issue440Test.java +++ b/src/test/java/com/cronutils/Issue440Test.java @@ -25,6 +25,6 @@ public void setUp() { public void testCase1() { CronDescriptor descriptor = CronDescriptor.instance(Locale.UK); String description = descriptor.describe(parser.parse("* 2,1/31 * * * ?")); - assertTrue(description.equalsIgnoreCase("at 2 minutes every 31 minutes")); + assertTrue(description.equalsIgnoreCase("Every second at 2 minutes and every 31 minutes")); } }