-
Notifications
You must be signed in to change notification settings - Fork 362
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
[Gibson0918] IP #375
Open
Gibson0918
wants to merge
41
commits into
nus-cs2103-AY2223S2:master
Choose a base branch
from
Gibson0918:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Gibson0918] IP #375
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
556af3f
Add Gradle support
d2246c4
Add Level 1. Greet, Echo, Exit feature
Gibson0918 28b9930
Level 2 Completed
Gibson0918 75b6c9e
Level 3 done
Gibson0918 27b9c65
level 4 completed
Gibson0918 a008a30
Update Duke.java
Gibson0918 7f54de7
Completed Duke's Automated Text UI testing
Gibson0918 f43cdd7
Level 5 Completed.
Gibson0918 7e981d9
Level 6 Completed
Gibson0918 ee4a824
Added Enumerations
Gibson0918 44bf9f2
Update Duke.java
Gibson0918 038d559
Delete unnecessary files
Gibson0918 cdbfde3
Level 7 Completed
Gibson0918 9e0df04
Level 8 Completed
Gibson0918 33c6108
Merge branch 'branch-Level-8'
Gibson0918 6b26a8e
Refactor Duke to use more OOP
Gibson0918 3893500
Merge remote-tracking branch 'upstream/add-gradle-support'
Gibson0918 a8d7d89
Merge remote-tracking branch 'origin/add-gradle-support'
Gibson0918 26a98f0
Fixed bugs related to datetime and organize duke into packages
Gibson0918 c722460
add Gradle to Duke
Gibson0918 dcb5baf
Added JUnit tests for Duke
Gibson0918 4dc52da
Merge branch 'master' of https://github.com/Gibson0918/ip
Gibson0918 1756cea
Release duke to the wild
Gibson0918 391e222
Added Java Docs to Duke
Gibson0918 ca66669
Added StringBuilder class to Duke
Gibson0918 fc417a2
Completed Level 9
Gibson0918 818d54e
Tweak Duke's code
Gibson0918 451fc56
Level 10 Completed
Gibson0918 6a11a02
Remove commented lines
Gibson0918 9b4f6d8
Added more Java Docs
Gibson0918 cbb24a9
Improve Duke's code quality
Gibson0918 cad9985
Update README.md
Gibson0918 486c91d
Add Update feature to Duke
Gibson0918 77e726e
Updated GUI and added set method to tasklist
Gibson0918 f94e91b
Added Assertions to Duke
Gibson0918 7d857d1
Merge pull request #2 from Gibson0918/branch-A-Assertions
Gibson0918 18c5321
Update README.md
Gibson0918 e2a6d89
Fixed some bugs relating to DateTime format and Duke exit command
Gibson0918 14367ac
Merge branch 'master' of https://github.com/Gibson0918/ip
Gibson0918 5954700
Added Ui image for docs
Gibson0918 b272b25
Clean up code for checkstyle
Gibson0918 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
public class Event extends Task { | ||
protected String from; | ||
protected String to; | ||
protected LocalDateTime from; | ||
protected LocalDateTime to; | ||
public Event(String description, String from, String to) { | ||
super(description); | ||
this.from = from; | ||
this.to = to; | ||
this.from = LocalDateTime.parse(from, DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm")); | ||
this.to = LocalDateTime.parse(to, DateTimeFormatter.ofPattern("yyyy-MM-dd HHmm")); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "[E]" + super.toString() + " (from: " + from + " to: " + to + ")"; | ||
return "[E]" + super.toString() + " (from: " + from.format(DateTimeFormatter.ofPattern("MMM dd yyyy HH:mm")) + " to: " + to.format(DateTimeFormatter.ofPattern("MMM dd yyyy HH:mm")) + ")"; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this return statement could be indented better |
||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps startDate and endDate would be better names