From 59c5438ecf0f5f71227bbd4846862656c852d816 Mon Sep 17 00:00:00 2001
From: Tanishq4331 <62829987+Tanishq4331@users.noreply.github.com>
Date: Mon, 25 Oct 2021 18:57:06 +0800
Subject: [PATCH 1/6] Update sortorders command in UG
---
docs/UserGuide.md | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 3a509888dab..ad7faf2c08a 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -292,11 +292,24 @@ List all the incomplete orders.
Format: `incompleteorders`
-### Sorting orders by amount: `sortorders`
+### Sorting orders: `sortorders`
-Sorts all orders by their amount and lists them in descending order.
+Sorts all orders based on a chosen field and ordering.
-Format: `sortorders`
+Format: `sortorders f/FIELD o/ORDERING`
+
+* Your orders are sorted based on the `FIELD` chosen. You may choose between:
+ * The Date field, identified with a "d" or "date".
+ * The Amount field, identified with an "a" or "amount".
+* The direction of the sorting depends on the `ORDERING`, which is either:
+ * Ascending order, identified with an "asc" or "ascending".
+ * Descending order, identified with a "desc" or "descending".
+
+
+Examples:
+* `sortorders f/date o/descending` sorts your orders in descending order of date (orders with later dates shown first).
+* `sortorders f/d o/asc` sorts your orders in ascending order of date (orders with earlier dates shown first).
+* `sortorders f/a o/ascending` sorts your orders in ascending order of amount (orders for smaller amounts shown first).
### Viewing total orders: `totalorders`
@@ -394,7 +407,7 @@ Action | Format, Examples
**MarkOrder** | `markorder INDEX` e.g. `markorder 2`
**CompletedOrders** | `completedorders`
**IncompleteOrders** | `incompleteorders`
-**SortOrders** | `sortorders`
+**SortOrders** | `sortorders f/FIELD o/ORDERING` e.g. `sortorders f/date o/descending`
**ViewTotalOrders** | `totalorders`
###General Commands
From e1e125590aa51110ba0fc250fbe06af785c7be63 Mon Sep 17 00:00:00 2001
From: Tanishq4331 <62829987+Tanishq4331@users.noreply.github.com>
Date: Mon, 25 Oct 2021 23:10:02 +0800
Subject: [PATCH 2/6] Update date formats in Help commands and UG
---
docs/UserGuide.md | 15 +++++++--------
.../address/logic/commands/AddOrderCommand.java | 2 +-
.../address/logic/commands/AddTaskCommand.java | 2 +-
.../address/logic/commands/EditTaskCommand.java | 2 +-
.../address/logic/commands/FindOrderCommand.java | 2 +-
5 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index ad7faf2c08a..f90665e5274 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -170,7 +170,7 @@ The new task will automatically be assigned the 'General' tag if the task tag pa
Examples:
-* `addtask l/sew buttons onto blazer d/20th August 2021 t/SO1` adds the task to the application if there is an order with the id of SO1.
+* `addtask l/sew buttons onto blazer d/20 August 2021 t/SO1` adds the task to the application if there is an order with the id of SO1.
### Deleting a task : `deletetask`
@@ -214,7 +214,7 @@ Format: `edittask INDEX [l/LABEL] [d/DATE] [t/TASKTAG]`
* Existing values will be updated to the input values.
Examples:
-* `edittask 1 l/order cloth d/19th September 2021` edits the label and date of the 1st task to be `order cloth` and `19th September 2021` respectively.
+* `edittask 1 l/order cloth d/19 September 2021` edits the label and date of the 1st task to be `order cloth` and `19th September 2021` respectively.
* `edittask 2 t/General` edits the tag of the 2nd task to be `General`
### Marking a task as done : `marktask`
@@ -257,8 +257,8 @@ Adds an order to the application.
Format: `addorder l/LABEL c/CUSTOMER a/AMOUNT d/DATE`
Examples:
-* `addorder l/blue blouse c/Alice a/21.90 d/20th August 2021`
-* `addorder l/school uniform c/John a/15.00 d/15th October 2021`
+* `addorder l/blue blouse c/Alice a/21.90 d/20 August 2021`
+* `addorder l/school uniform c/John a/15.00 d/15 October 2021`
### Deleting an order: `deleteorder`
@@ -305,7 +305,6 @@ Format: `sortorders f/FIELD o/ORDERING`
* Ascending order, identified with an "asc" or "ascending".
* Descending order, identified with a "desc" or "descending".
-
Examples:
* `sortorders f/date o/descending` sorts your orders in descending order of date (orders with later dates shown first).
* `sortorders f/d o/asc` sorts your orders in ascending order of date (orders with earlier dates shown first).
@@ -390,9 +389,9 @@ Action | Format, Examples
Action | Format, Examples
--------|------------------
**ListTasks** | `listtask`
-**AddTask** | `addtask l/LABEL d/DATE` e.g. `addtask l/sew buttons onto blazer d/20th August 2021`
+**AddTask** | `addtask l/LABEL d/DATE` e.g. `addtask l/sew buttons onto blazer d/20 August 2021`
**DeleteTask** | `deletetask INDEX` e.g. `deletetask 1`
-**EditTask** | `edittask INDEX l/LABEL d/DATE` e.g. `edittask 1 l/order cloth d/19th September 2021`
+**EditTask** | `edittask INDEX l/LABEL d/DATE` e.g. `edittask 1 l/order cloth d/19 September 2021`
**MarkDone** | `markdone INDEX` e.g. `markdone 2`
**CompletedTasks** | `completedtasks`
**IncompleteTasks** | `incompletetasks`
@@ -402,7 +401,7 @@ Action | Format, Examples
Action | Format, Examples
--------|------------------
**ListOrders** | `listorder`
-**AddOrder** | `addorder l/LABEL c/CUSTOMER a/AMOUNT d/DATE` e.g. `addorder l/blue blouse c/Alice a/21.90 d/20th August 2021`
+**AddOrder** | `addorder l/LABEL c/CUSTOMER a/AMOUNT d/DATE` e.g. `addorder l/blue blouse c/Alice a/21.90 d/20 August 2021`
**DeleteOrder** | `deleteorder INDEX` e.g. `deleteorder 1`
**MarkOrder** | `markorder INDEX` e.g. `markorder 2`
**CompletedOrders** | `completedorders`
diff --git a/src/main/java/seedu/address/logic/commands/AddOrderCommand.java b/src/main/java/seedu/address/logic/commands/AddOrderCommand.java
index 099b90a00c3..4b9b88f30e2 100644
--- a/src/main/java/seedu/address/logic/commands/AddOrderCommand.java
+++ b/src/main/java/seedu/address/logic/commands/AddOrderCommand.java
@@ -24,7 +24,7 @@ public class AddOrderCommand extends Command {
+ PREFIX_LABEL + "School uniform "
+ PREFIX_CUSTOMER + "Alice "
+ PREFIX_AMOUNT + "10.90 "
- + PREFIX_DATE + "20th August 2021";
+ + PREFIX_DATE + "20 August 2021";
public static final String MESSAGE_SUCCESS = "New order added: %1$s";
diff --git a/src/main/java/seedu/address/logic/commands/AddTaskCommand.java b/src/main/java/seedu/address/logic/commands/AddTaskCommand.java
index 35893e022ea..16f078e47b4 100644
--- a/src/main/java/seedu/address/logic/commands/AddTaskCommand.java
+++ b/src/main/java/seedu/address/logic/commands/AddTaskCommand.java
@@ -20,7 +20,7 @@ public class AddTaskCommand extends Command {
+ "[" + PREFIX_TASK_TAG + "TASKTAG]\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_LABEL + "Sew buttons onto black blazer "
- + PREFIX_DATE + "20th August 2021 "
+ + PREFIX_DATE + "20 August 2021 "
+ PREFIX_TASK_TAG + "SO2103";
public static final String MESSAGE_SUCCESS = "New task added: %1$s";
diff --git a/src/main/java/seedu/address/logic/commands/EditTaskCommand.java b/src/main/java/seedu/address/logic/commands/EditTaskCommand.java
index 66b55b85c81..bd716e51547 100644
--- a/src/main/java/seedu/address/logic/commands/EditTaskCommand.java
+++ b/src/main/java/seedu/address/logic/commands/EditTaskCommand.java
@@ -35,7 +35,7 @@ public class EditTaskCommand extends Command {
+ "[" + PREFIX_TASK_TAG + "TASKTAG]...\n"
+ "Example: " + COMMAND_WORD + " 1 "
+ PREFIX_LABEL + "Order cloth "
- + PREFIX_DATE + "19th September 2021"
+ + PREFIX_DATE + "19 September 2021"
+ PREFIX_TASK_TAG + "SO2100";
public static final String MESSAGE_EDIT_TASK_SUCCESS = "Edited Task: %1$s";
diff --git a/src/main/java/seedu/address/logic/commands/FindOrderCommand.java b/src/main/java/seedu/address/logic/commands/FindOrderCommand.java
index 07be994188f..f7560a6013c 100644
--- a/src/main/java/seedu/address/logic/commands/FindOrderCommand.java
+++ b/src/main/java/seedu/address/logic/commands/FindOrderCommand.java
@@ -14,7 +14,7 @@ public class FindOrderCommand extends Command {
+ "contain any of the specified keywords (case-insensitive) and "
+ "displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
- + "Example: " + COMMAND_WORD + " 20th August John";
+ + "Example: " + COMMAND_WORD + " 20 August John";
private final OrderContainsKeywordsPredicate predicate;
From 2b0bf8c2519139ac927c464d7b7c8f7c03845276 Mon Sep 17 00:00:00 2001
From: Tanishq4331 <62829987+Tanishq4331@users.noreply.github.com>
Date: Mon, 25 Oct 2021 23:33:15 +0800
Subject: [PATCH 3/6] Add Date format table to UG
---
docs/UserGuide.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index f90665e5274..6018776a487 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -59,6 +59,17 @@ Some example commands you can try:
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
+* Date inputs should follow one of the formats below
+
+ Format | Example
+ --------|------------------
+ **dd mmmm yyyy** | `08 November 2001`
+ **dd mmm yyyy** | `08 Nov 2021`
+ **yyyy mm dd** | `2021 11 08`
+ **dd-mm-yyyy** | `08-11-2021`
+ **yyyy/mm/dd** | `2021/11/08`
+ **dd/mm/yyyy** | `08/11/2021`
+
## Person Commands
From cb3586e0f22ec286bf00536d183cdf04c0acced4 Mon Sep 17 00:00:00 2001
From: Tanishq4331 <62829987+Tanishq4331@users.noreply.github.com>
Date: Tue, 26 Oct 2021 10:25:37 +0800
Subject: [PATCH 4/6] Include default ordering in UG
---
docs/UserGuide.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 6018776a487..9b71a757936 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -312,10 +312,14 @@ Format: `sortorders f/FIELD o/ORDERING`
* Your orders are sorted based on the `FIELD` chosen. You may choose between:
* The Date field, identified with a "d" or "date".
* The Amount field, identified with an "a" or "amount".
-* The direction of the sorting depends on the `ORDERING`, which is either:
+* By default, the orders are sorted in the sequence they are added. This is also used as a tiebreaker when two or more orders have an identical value for the `FIELD` chosen.
+* The direction of the sorting depends on the `ORDERING`, which is either in:
* Ascending order, identified with an "asc" or "ascending".
* Descending order, identified with a "desc" or "descending".
+