From 65f8fd8793421efffc3618a0c6c3a6e9696a3b66 Mon Sep 17 00:00:00 2001 From: Pluiexo Date: Thu, 22 Feb 2024 19:20:24 +0800 Subject: [PATCH] Tidy JavaDocs --- README.md | 19 ++++++++++--------- docs/README.md | 2 +- src/main/java/plato/parser/DateHandler.java | 4 ++-- src/main/java/plato/parser/Parser.java | 3 ++- src/main/java/plato/task/Actions.java | 2 +- src/main/java/plato/task/TaskManager.java | 7 ++++--- src/main/java/plato/task/Todo.java | 1 - 7 files changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index fd2d0cb9cf..0304f754cc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# plato.Plato project template +# Plato project template -This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it. +This is a project template for a greenfield Java project. It's inspired after the Java mascot _Duke_. Given below are instructions on how to use it. ## Setting up in Intellij @@ -13,12 +13,13 @@ Prerequisites: JDK 11, update Intellij to the most recent version. 1. If there are any further prompts, accept the defaults. 1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).
In the same dialog, set the **Project language level** field to the `SDK default` option. -3. After that, locate the `src/main/java/plato.Plato.java` file, right-click it, and choose `Run plato.Plato.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output: +3. After that, locate the `src/main/java/plato/Launcher.java` file, right-click it, and choose `Run plato.Launcher.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see a GUI window. ``` Hello from - ____ _ - | _ \ _ _| | _____ - | | | | | | | |/ / _ \ - | |_| | |_| | < __/ - |____/ \__,_|_|\_\___| - ``` + .______ __ ___ .___________. ______ + | _ \ | | / \ | | / __ \ + | |_) | | | / ^ \ `---| |----`| | | | + | ___/ | | / /_\ \ | | | | | | + | | | `----./ _____ \ | | | `--' | + | _| |_______/__/ \__\ |__| \______/ + ``` \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 2e1c0a5686..40fa9e3d31 100644 --- a/docs/README.md +++ b/docs/README.md @@ -84,7 +84,7 @@ Examples: * `event cs2103 planning /from 1800 24/02/24 /to 1900 27/02/24` -* `event midterm study session /from 01:00pm 28-02-24 /to 02:00pm 30-02-24` +* `event midterm study session /from 01:00pm 28-02-24 /to 02:00pm 01-03-24` Expected outcome: ``` diff --git a/src/main/java/plato/parser/DateHandler.java b/src/main/java/plato/parser/DateHandler.java index 6bc908ab81..4c24431434 100644 --- a/src/main/java/plato/parser/DateHandler.java +++ b/src/main/java/plato/parser/DateHandler.java @@ -16,7 +16,7 @@ public class DateHandler { //Inspired from: https://www.baeldung.com/java-date-regular-expressions private static final Pattern PATTERN_DATE = - Pattern.compile("([a-zA-Z]+)?\\s?(?\\d{1,2})[-/](?\\d{1,2})[-/](?\\d{2,4})\\s?([a-zA-Z]+)?"); + Pattern.compile("([a-zA-Z]+)?\\s?(?(?\\d{1,2})[-/](?\\d{1,2})[-/](?\\d{2,4}))\\s?([a-zA-Z]+)?"); private static final Pattern TIME_PATTERN = Pattern.compile("(.+)?\\s?(?