Skip to content

Commit

Permalink
update code quality
Browse files Browse the repository at this point in the history
included <br> in user guide for number bullets too
  • Loading branch information
rexkoh425 committed Oct 9, 2024
1 parent af35a9a commit 4c7e716
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 29 deletions.
52 changes: 26 additions & 26 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Finally, a Save feature is also introduced which allows you to save and load tas

# Getting Started

1) Make sure you have Java 17 or above installed on your computer.
2) Download the .jar file
3) Open a terminal in the directory which you saved the .jar file, then run the following:
<br>`java -jar ip.jar`
1) Make sure you have Java 17 or above installed on your computer.<br>
2) Download the .jar file<br>
3) Open a terminal in the directory which you saved the .jar file, then run the following: <br>
<br>`java -jar ip.jar` <br>


# Initial configuration
Expand Down Expand Up @@ -72,10 +72,10 @@ Add task which has a specific deadline.
Example: `deadline return book /by 20/10/2025 1800`

Formatting rules :
1) "deadline" is not Caps-Sensitive.
1) "deadline" is not Caps-Sensitive. <br>
2) Dates in the form of `dd/MM/yyyy HHmm` (e.g. 20/10/2025 1800) will be converted
to `dd/MMM/yyyy H a` (e.g. 20 October 2025 , 6 pm) automatically
3) Dates other than `dd/MMM/yyyy H a` and `dd/MM/yyyy` format will not be available for the `get` command
to `dd/MMM/yyyy H a` (e.g. 20 October 2025 , 6 pm) automatically <br>
3) Dates other than `dd/MMM/yyyy H a` and `dd/MM/yyyy` format will not be available for the `get` command<br>

General format : `deadline [task] /by [time]`

Expand All @@ -96,10 +96,10 @@ Add task which has a duration.
Example: `event travel /from 20/10/2025 1800 /to 20/11/2025 1800`

Formatting rules :
1) "event" is not Caps-Sensitive.
1) "event" is not Caps-Sensitive.<br>
2) Dates in the form of `dd/MM/yyyy HHmm` (e.g. 20/10/2025 1800) will be converted
to `dd/MMM/yyyy H a` (e.g. 20 October 2025 , 6 pm) automatically
3) Dates other than `dd/MMM/yyyy H a` and `dd/MM/yyyy` format will not be available for the `get` command
to `dd/MMM/yyyy H a` (e.g. 20 October 2025 , 6 pm) automatically<br>
3) Dates other than `dd/MMM/yyyy H a` and `dd/MM/yyyy` format will not be available for the `get` command<br>

General format : `event [task] /from [start time] /by [end time]`

Expand All @@ -120,7 +120,7 @@ Add task without deadlines.
Example: `todo travel`

Formatting rules :
1) "todo" is not Caps-Sensitive.
1) "todo" is not Caps-Sensitive.<br>

General format : `todo [task]`

Expand All @@ -138,8 +138,8 @@ ____________________________________________________________
Mark task as complete and incomplete.

Formatting rules :
1) "mark" / "unmark" is not Caps-Sensitive.
2) Only <b>one</b> task can be marked per command (i.e. `mark 1 2`) is not valid
1) "mark" / "unmark" is not Caps-Sensitive.<br>
2) Only <b>one</b> task can be marked per command (i.e. `mark 1 2`) is not valid<br>

General format : `mark [number]`

Expand Down Expand Up @@ -173,9 +173,9 @@ Prints the format for all the commands available
Example: `help`

Formatting rules :
1) "help" is not Caps-Sensitive.
1) "help" is not Caps-Sensitive.<br>
2) Help command will be triggered if first word is "help" and ignores remainder of the commands
(i.e. `help me with command` , `help 12414`) would work.
(i.e. `help me with command` , `help 12414`) would work.<br>

General format : `help`

Expand All @@ -201,8 +201,8 @@ Delete a specific task from the list
Example: `delete 1`

Formatting rules :
1) "delete" is not Caps-Sensitive.
2) Deleting a task using a number greater than total of no. of task will not result in any change.
1) "delete" is not Caps-Sensitive.<br>
2) Deleting a task using a number greater than total of no. of task will not result in any change.<br>

General format : `delete [number]`

Expand All @@ -229,11 +229,11 @@ Get all the task which are of specific date
Example: `get 20/10/2025`

Formatting rules :
1) "get" is not Caps-Sensitive.
2) Date specified must be of `dd/MM/yyyy` format only
1) "get" is not Caps-Sensitive.<br>
2) Date specified must be of `dd/MM/yyyy` format only<br>
3) Dates in `dd/MMM/yyyy H a` and `dd/MM/yyyy` format will be compared with and task with same day , month and year
will be shown.
4) Multiple dates are not accepted and would result 0 matching cases.
will be shown.<br>
4) Multiple dates are not accepted and would result 0 matching cases.<br>

General format : `get [dd/MM/yyyy]`

Expand All @@ -259,9 +259,9 @@ Get all the task which are of specific keyword
Example: `find travel`

Formatting rules :
1) "find" is not Caps-Sensitive.
2) Keyword should only be 1 word.
4) Multi-word queries are not accepted and would result 0 matching cases.
1) "find" is not Caps-Sensitive.<br>
2) Keyword should only be 1 word.<br>
4) Multi-word queries are not accepted and would result 0 matching cases.<br>

General format : `find [single word]`

Expand All @@ -288,9 +288,9 @@ Exits the program
Example: `bye`

Formatting rules :
1) "bye" is not Caps-Sensitive.
1) "bye" is not Caps-Sensitive.<br>
2) Bye command will be triggered if first word is "Bye" and ignores remainder of the commands
(i.e. `bye me with command` , `bye 12414`) would work.
(i.e. `bye me with command` , `bye 12414`) would work.<br>

General format : `bye`

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/TheThinker/File/FileLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ private static void createFolder(File directoryName){
}
}

/**
* Get user input on whether they want to save task to a file
*/
public static boolean shouldSaveTask() {
UiControl.printSeparation();
System.out.println("Do you want to save your tasks to a file? yes / no");
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/TheThinker/Parser/DateParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private static boolean isMatchingDate(String taskDate , String specifiedDate) {
return false;
}

public static boolean isDateOnlyFormat(String dateStr){
private static boolean isDateOnlyFormat(String dateStr){
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd/MM/yyyy");

try {
Expand All @@ -129,7 +129,7 @@ public static boolean isDateOnlyFormat(String dateStr){
}
}

public static boolean isDateTimeFormat(String dateStr){
private static boolean isDateTimeFormat(String dateStr){

try {

Expand All @@ -142,7 +142,7 @@ public static boolean isDateTimeFormat(String dateStr){
}
}

public static boolean isResultDateTimeFormat(String dateStr){
private static boolean isResultDateTimeFormat(String dateStr){

try {

Expand Down
12 changes: 12 additions & 0 deletions text-ui-test/basic_inputs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
no
todo remove book
deadline get book /by 10/12/2002 1800
get 10/12/2002
mark 1
unmark 1
delete 1
event book /from 10/12/2002 1800 /to 12/12/2002 1800
find book
get 10/12/2002
list
bye

0 comments on commit 4c7e716

Please sign in to comment.