src/main/java/seedu/address/model/calorie/Time.java
/**
     * Returns if a given string is a valid Time.
     */
Returns if a given string is a valid Time.
Returns if a given string is a valid Time .
public static boolean isValidTime(String test) {
        if (test.matches(VALIDATION_REGEX)) {
            int hour = Integer.parseInt(test.substring(0, 2));
            int min = Integer.parseInt(test.substring(2, 4));
            return hour <= 23 && min <= 59;
        } else {
            return false;
        }
    }
public static boolean isValidTime ( String test ) { if ( test . matches ( VALIDATION_REGEX ) ) { int hour = Integer . parseInt ( test . substring ( 0 , 2 ) ) ; int min = Integer . parseInt ( test . substring ( 2 , 4 ) ) ; return hour <= 23 && min <= 59 ; } else { return false ; } }
Returns if a given string is a valid Time.
Returns if a given string is a valid Time .