@@ -0,0 +1,1506 @@
+package seedu.task.model.util;%0A%0Aimport java.util.Calendar;%0A%0Aimport seedu.task.commons.exceptions.IllegalValueException;%0A%0Apublic class DateParser %7B%0A    public static final String DATE_STRING_ILLEGAL_FORMAT =%0A            %22String given to the DateParser must be of the form YYYY/MM/DD HHMM%22;%0A%0A    private static int DEFAULT_SECONDS = 0;%0A    private static final String DATE_STRING_VALIDATION_REGEX = %22%5B0-9%5D%7B4%7D/%5B0-1%5D%5B0-9%5D/%5B1-3%5D%5B0-9%5D %5B0-2%5D%5B0-9%5D%5B0-5%5D%5B0-9%5D%22;%0A    %0A    %0A%0A%09public static Calendar parse(String date) throws IllegalValueException%7B%0A%09%09if (isValidDateString(date)) %7B%0A%09%09%09throw new IllegalValueException(DATE_STRING_ILLEGAL_FORMAT);%0A%09%09%7D%0A%09%09Calendar cal = Calendar.getInstance();%0A%09%09int year = getYear(date);%0A%09%09int month = getMonth(date);%0A%09%09int day = getDay(date);%0A%09%09int hour = getHour(date);%0A%09%09int minute = getMinute(date);%0A%09%09cal.set(year, month, day, hour, minute, DEFAULT_SECONDS);%0A%09%09return cal;%0A%09%7D%0A%0A%09private static boolean isValidDateString(String test) %7B%0A        return test.matches(DATE_STRING_VALIDATION_REGEX);%0A%09%7D%0A%0A%09private static int getYear(String date) %7B%0A%09%09return Integer.parseInt(date.substring(0,  4));%0A%09%7D%0A%0A%09private static int getMonth(String date) %7B%0A%09%09return Integer.parseInt(date.substring(5,  7));%0A%09%7D%0A%0A%09private static int getDay(String date) %7B%0A%09%09return Integer.parseInt(date.substring(8, 10));%0A%09%7D%0A%0A%09private static int getHour(String date) %7B%0A%09%09return Integer.parseInt(date.substring(11, 13));%0A%09%7D%0A%0A%09private static int getMinute(String date) %7B%0A%09%09return Integer.parseInt(date.substring(13));%0A%09%7D%0A%7D%0A

add parser for date strings