Skip to content

Commit

Permalink
Tiny refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
masoudarvishian committed May 10, 2024
1 parent 8e90d67 commit 88715d9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ private static void setJobShifts(Job job, LocalDate startDate, LocalDate endDate
}

private static void validateDates(LocalDate startDate, LocalDate endDate) {

if (startDate.isEqual(endDate)) {
if (startDate.isEqual(endDate))
throw new IllegalArgumentException("Start date and end date should not be equal");
}

if (startDate.isBefore(LocalDate.now()))
throw new InvalidStartDateException("Start date cannot be before now");
Expand Down

0 comments on commit 88715d9

Please sign in to comment.