Skip to content

Commit

Permalink
Merge pull request #86 from S-Aishvarya/branch-ListCommand
Browse files Browse the repository at this point in the history
Edit list-by-date and list-until-date
  • Loading branch information
jeong-jaeho authored Apr 4, 2024
2 parents 2b25031 + 4c39552 commit 9bba7f1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package seedu.address.logic.parser;

import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_DATE_OF_VISIT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_APPOINTMENT;

import java.time.LocalDate;

Expand All @@ -17,15 +17,15 @@ public class ListByDateCriteriaCommandParser implements Parser<ListByDateCriteri
@Override
public ListByDateCriteriaCommand parse(String args) throws ParseException {

ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_DATE_OF_VISIT);
ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_APPOINTMENT);

if (!argMultimap.getPreamble().equals("")) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
ListByDateCriteriaCommand.MESSAGE_USAGE));
}

LocalDate dateOfVisit =
ParserUtil.parseAppointment(argMultimap.getValue(PREFIX_DATE_OF_VISIT).get()).appointment;
ParserUtil.parseAppointment(argMultimap.getValue(PREFIX_APPOINTMENT).get()).appointment;
ApptDateMatchesPredicate apptDatePredicate = new ApptDateMatchesPredicate(dateOfVisit);

return new ListByDateCriteriaCommand(apptDatePredicate);
Expand Down

0 comments on commit 9bba7f1

Please sign in to comment.