src/main/java/seedu/address/model/applicant/DateApplied.java
public static boolean isValidDateApplied(String test) {
        requireNonNull(test);
        DateTimeFormatter format = DateTimeFormatter.ofPattern("uuuu-MM-dd").withResolverStyle(ResolverStyle.STRICT);
        if (test.equals("PENDING")) {
            return true;
        }
        try {
            LocalDate parsedDate = LocalDate.parse(test, format);
            return test.matches(VALIDATION_REGEX);
        } catch (Exception e) {
            System.out.println(e);
            return false;
        }
    }
/**
     * Returns true if a given string is a valid date.
     */
Returns true if a given string is a valid date.
Returns true if a given string is a valid date .
public static boolean isValidDateApplied(String test) {
        requireNonNull(test);
        DateTimeFormatter format = DateTimeFormatter.ofPattern("uuuu-MM-dd").withResolverStyle(ResolverStyle.STRICT);
        if (test.equals("PENDING")) {
            return true;
        }
        try {
            LocalDate parsedDate = LocalDate.parse(test, format);
            return test.matches(VALIDATION_REGEX);
        } catch (Exception e) {
            System.out.println(e);
            return false;
        }
    }
public static boolean isValidDateApplied ( String test ) { requireNonNull ( test ) ; DateTimeFormatter format = DateTimeFormatter . ofPattern ( "uuuu-MM-dd" ) . withResolverStyle ( ResolverStyle . STRICT ) ; if ( test . equals ( "PENDING" ) ) { return true ; } try { LocalDate parsedDate = LocalDate . parse ( test , format ) ; return test . matches ( VALIDATION_REGEX ) ; } catch ( Exception e ) { System . out . println ( e ) ; return false ; } }
Returns true if a given string is a valid date.
Returns true if a given string is a valid date .