package tars.commons.util;

public class DateTimeUtil {
    /**
     * Extracts the new task's dateTime from the add command's task arguments string.
     */
    public static String[] getDateTimeFromArgs(String taskArguments) {
        if (taskArguments.contains("to")) {
            int toIndex = taskArguments.indexOf("to");
            String startDateTime = taskArguments.substring(0, toIndex).trim();
            String endDateTime = taskArguments.substring(toIndex + 2).trim();
            return new String[] {startDateTime, endDateTime};
        } else {
            return new String[] {null, taskArguments};
        }
    }
}

@@ -233,16 +233,105 @@
      if 
+(taskArguments.equals(%22%22)) %7B%0A            return new String%5B%5D %7B%22%22, %22%22%7D;%0A        %7D else if 
 (taskArg
@@ -683,12 +683,10 @@
 %5B%5D %7B
-null
+%22%22
 , ta
@@ -696,16 +696,23 @@
 rguments
+.trim()
 %7D;%0A     

Update DateTimeUtil.java