Closed newbishme closed 9 years ago
@HaLinhh anyway for me to call the DateParser to try to parse the information?
I think DateParser's parseDate method is public, so it can be used from Google. Would it be better to call InputParser? That way you don't have to parse the string to get the keyword?
Yes from InputParser will be better. Which method(s) should I be looking at?
I think you can try add addt in front of the task and pass to receiveInput(String). It is a public method. Alternatively you can try processAdd(command, parameter), but it is now private.
It being a public method is not good enough as now I have to new an InputParser object from GoogleComponent.
Also, receiveInput does not return anything so I cannot receive anything.
I think what we need is a method in InputParser that other components can just call without thinking of what to do.
Similar to this method: getTaskFromString(String) but it should do all the parsing with all the date(s). To identify what type of task to parse, I could further specify a String parameter, taskType.
getTaskFromString(String desc, String taskType);
Usage: getTaskFromString(desc, Task.TASK_DEADLINE) for example.
Status update on this issue?
I updated the code and ran the test. Please tell me if I have overlooked any test cases.
@HaLinhh the code you uploaded is very buggy, im fixing it. in the meantime, could you remove the date from the deadline task? only append the time.
For example: "by 15:00" instead of "by 15:00 10/11"
We did not plan this from the beginning but since we support setting time in deadline tasks, we should look into this.
Current version sets it to 00:00 [default of Task](The date that is on the DeadlineTask/Task object) Older version sets it to 23:59 [default of Task, too]
What should be the best way to solve this? (Adding deadline task from Google to get the Time recognised)
@cs2103aug2014-w10-4j/developers