File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/main/java/seedu/address/logic/parser Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1515 */
1616public class ViewAppointmentByDateParser implements Parser <ViewAppointmentByDateCommand > {
1717
18+ private static final String MESSAGE_INVALID_DATE_FORMAT =
19+ "Please enter a valid date. The correct format is dd-MM-yyyy" ;
20+
1821 @ Override
1922 public ViewAppointmentByDateCommand parse (String args ) throws ParseException {
2023 ArgumentMultimap argMultimap = ArgumentTokenizer .tokenize (args , PREFIX_DATE );
@@ -29,7 +32,7 @@ public ViewAppointmentByDateCommand parse(String args) throws ParseException {
2932 try {
3033 date = LocalDate .parse (argMultimap .getValue (PREFIX_DATE ).get (), DateUtil .getDateFormatter ());
3134 } catch (Exception e ) {
32- throw new ParseException (String .format (MESSAGE_INVALID_COMMAND_FORMAT ,
35+ throw new ParseException (String .format (MESSAGE_INVALID_DATE_FORMAT ,
3336 ViewAppointmentByDateCommand .MESSAGE_USAGE ));
3437 }
3538
You can’t perform that action at this time.
0 commit comments