We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 35c8471 + 64861b3 commit 470c7d1Copy full SHA for 470c7d1
src/main/java/trackitnus/logic/parser/ParserUtil.java
@@ -302,6 +302,9 @@ public static LessonDateTime parseLessonDateTime(String date) throws ParseExcept
302
}
303
String[] startEndTime = tokens[1].split("-", 2);
304
DayOfWeek weekday = parseLessonWeekday(tokens[0]);
305
+ if (startEndTime.length != 2) {
306
+ throw new ParseException(LessonDateTime.MESSAGE_CONSTRAINTS);
307
+ }
308
LocalTime startTime = LocalTime.parse(startEndTime[0], LessonDateTime.FORMATTER);
309
LocalTime endTime = LocalTime.parse(startEndTime[1], LessonDateTime.FORMATTER);
310
if (startTime.compareTo(endTime) >= 0) {
0 commit comments