A java class to check user input for a valid date