diff --git a/src/main/java/reposense/parser/ArgsParser.java b/src/main/java/reposense/parser/ArgsParser.java index 60dacabd6c..ff6ea7ae95 100644 --- a/src/main/java/reposense/parser/ArgsParser.java +++ b/src/main/java/reposense/parser/ArgsParser.java @@ -424,14 +424,14 @@ private static void addAnalysisDatesToBuilder(CliArguments.Builder builder, Name ? untilDate : currentDate; - if (sinceDate.compareTo(untilDate) > 0) { - throw new ParseException(MESSAGE_SINCE_DATE_LATER_THAN_UNTIL_DATE); - } - if (sinceDate.compareTo(currentDate) > 0) { throw new ParseException(MESSAGE_SINCE_DATE_LATER_THAN_TODAY_DATE); } + if (sinceDate.compareTo(untilDate) > 0) { + throw new ParseException(MESSAGE_SINCE_DATE_LATER_THAN_UNTIL_DATE); + } + builder.sinceDate(sinceDate) .isSinceDateProvided(isSinceDateProvided) .untilDate(untilDate)