Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Goh Yijie Jonathan] ip #499

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
556af3f
Add Gradle support
May 24, 2020
debd796
Added command echoing (level -1)
jgyj123 Aug 17, 2022
5feb915
Level 2. Add, List
jgyj123 Aug 17, 2022
d64bbe9
Add the ability to mark tasks as done.
jgyj123 Aug 17, 2022
9eec39d
Add support for tracking three types of tasks:
jgyj123 Aug 17, 2022
d5676a5
Add Automated Text UI Testing
jgyj123 Aug 18, 2022
d26111e
Add Exception Handling
jgyj123 Aug 18, 2022
757d895
Add support for deleting tasks from the list.
jgyj123 Aug 18, 2022
09540fe
Add support for saving task in hard disk
jgyj123 Aug 24, 2022
c58d886
Add support for missing data folder
jgyj123 Aug 24, 2022
f4e7424
Add date parsing functionality
jgyj123 Aug 24, 2022
92d3732
Add parsing for dates
jgyj123 Aug 24, 2022
1e2205a
Revert "Add parsing for dates"
jgyj123 Aug 24, 2022
41fea6a
Revert "Revert "Add parsing for dates""
jgyj123 Aug 24, 2022
541ace7
Revert "Revert "Revert "Add parsing for dates"""
jgyj123 Aug 24, 2022
b867d99
Add date parsing
jgyj123 Aug 24, 2022
f17a1bf
Resolve bugs after merging branches 7 and 8
jgyj123 Aug 24, 2022
4ea4b78
Use more OOP
jgyj123 Aug 24, 2022
482591f
Add gradle support
jgyj123 Aug 26, 2022
176cafe
Add test file skeleton
jgyj123 Aug 26, 2022
e3d9944
Add JUnit tests
jgyj123 Aug 26, 2022
85ad687
Update marking of finished tasks
jgyj123 Aug 26, 2022
4a90319
Add JavaDoc for classes and methods
jgyj123 Aug 27, 2022
353532f
Follow coding standard
jgyj123 Aug 27, 2022
cd59fe1
Enable users to find task by searching for keyword
jgyj123 Aug 27, 2022
213a3c1
Merge branch 'A-JavaDoc'
jgyj123 Aug 27, 2022
f580256
Merge branch 'A-CodingStandard'
jgyj123 Aug 27, 2022
3b4851d
Merge branch 'Level-9'
jgyj123 Aug 27, 2022
04e0e8c
Divide classes into packages
jgyj123 Aug 29, 2022
8b74845
Add GUI to Duke using JavaFX
jgyj123 Aug 31, 2022
5ea0c5e
Merge branch 'branch-Level-10'
jgyj123 Aug 31, 2022
d501d21
update entry point of application
jgyj123 Sep 9, 2022
33a1260
Use Assert feature
jgyj123 Sep 9, 2022
3e398db
Improve code quality of code in parser class
jgyj123 Sep 9, 2022
62736b5
Merge pull request #1 from jgyj123/A-Assertions
jgyj123 Sep 9, 2022
ee48c2c
Merge branch 'master' into A-CodeQuality
jgyj123 Sep 9, 2022
2318de5
Merge pull request #2 from jgyj123/A-CodeQuality
jgyj123 Sep 9, 2022
319c864
Allow users to view deadlines and events on a specified date
jgyj123 Sep 9, 2022
62848e1
Allow users to indicate time of event and deadline
jgyj123 Sep 16, 2022
dc171d6
Add user guide
jgyj123 Sep 16, 2022
8b23f7d
Add line spacing to readme
jgyj123 Sep 16, 2022
851ccae
Add more line spacing to readme
jgyj123 Sep 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add date parsing functionality
  • Loading branch information
jgyj123 committed Aug 24, 2022
commit f4e74248ce38e084c3fea976325ebf40a5ef0f76
11 changes: 8 additions & 3 deletions src/main/java/Deadline.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;

public class Deadline extends Task {
private String date;
private LocalDate date;
public Deadline (String s) {
super(s.split("/by")[0].substring(8).strip());
date = s.split("/by")[1].strip();
date = LocalDate.parse(s.split("/by")[1].strip());
}
@Override
public String toString() {
String completion = this.isComplete() ? "[✓]" : "[✗]";
return "[D]" + completion + " " +this.getTaskName() + " (by: " + date + ")";
return "[D]" + completion + " " + this.getTaskName() + " (by: " +
date.format(DateTimeFormatter.ofPattern("MMM d yyyy")) + ")";
}
}
10 changes: 7 additions & 3 deletions src/main/java/Event.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class Event extends Task {
private String date;
private LocalDate date;
public Event (String s) {
super(s.split("/at")[0].substring(5).strip());
date = s.split("/at")[1].strip();
date = LocalDate.parse(s.split("/at")[1].strip());
}
@Override
public String toString() {
String completion = this.isComplete() ? "[✓]" : "[✗]";
return "[E]" + completion + " " + this.getTaskName() + " (at: " + date + ")";
return "[E]" + completion + " " + this.getTaskName() + " (at: "
+ date.format(DateTimeFormatter.ofPattern("MMM d yyyy")) + ")";
}
}