Skip to content
Snippets Groups Projects

Small fixes

9 files
+ 58
28
Compare changes
  • Side-by-side
  • Inline

Files

@@ -131,6 +131,14 @@ public abstract class ImportHandler<E> {
}
}
protected Optional<Boolean> parseBoolean(String value) {
if (Set.of("1", "true", "yes", "y").contains(value.toLowerCase()))
return Optional.of(true);
if (Set.of("0", "false", "no", "n").contains(value.toLowerCase()))
return Optional.of(false);
return Optional.empty();
}
protected Optional<LocalDate> parseDate(String date) {
try {
return Optional.of(LocalDate.parse(date, DateTimeFormatter.ofPattern("dd-MM-yyyy")));
Loading