Delete DaveValidatorUsingLocalDate.java

This commit is contained in:
Loredana Crusoveanu 2019-06-20 21:45:00 +03:00 committed by GitHub
parent 3862de2519
commit 6e1910a814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 24 deletions

View File

@ -1,24 +0,0 @@
package com.baeldung.date.validation;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
public class DaveValidatorUsingLocalDate implements DateValidator {
private DateTimeFormatter dateFormatter;
public DaveValidatorUsingLocalDate(DateTimeFormatter dateFormatter) {
super();
this.dateFormatter = dateFormatter;
}
@Override
public boolean validate(String dateStr) {
try {
LocalDate.parse(dateStr, this.dateFormatter);
} catch (DateTimeParseException e) {
return false;
}
return true;
}
}