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

Included a DateTimeFormatter formatter and LocalDate date #90

Merged
merged 3 commits into from
Mar 26, 2019

Conversation

kjiaxuan
Copy link

Added a LocalDate variable in Date.java
so dates are now not in string format unless use toString()

i think can use this to sort dates, or implement set feature (budget for a certain period of time etc)

@kjiaxuan
Copy link
Author

#91

@kjiaxuan kjiaxuan added type.Task Something that needs to be done, but not a story needsReview labels Mar 26, 2019
@kjiaxuan kjiaxuan added this to the Milestone v1.3 milestone Mar 26, 2019
@geezlouisee
Copy link

Good job adding in the Date API! I think this will be useful when we want to implement most of our features. I also read somewhere that the API will help to ensure our time implementation to be immutable and hence, also thread-safe.

Copy link

@JeremyLoye JeremyLoye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a good idea to implement a LocalDate object for our dates. Do consider some revisions in implementation though:
The isValidDate method currently has repeat checks namely the check of test string with VALIDATION_REGEX and the LocalDate parse check. Possible to remove the regex with current implementation.

Copy link

@eugeneyl eugeneyl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the DateTimeFormatter will help in preventing the input of strings that are not actually date and prevent confusion during the implementation.

@geezlouisee geezlouisee merged commit a091421 into CS2103-AY1819S2-W17-3:master Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type.Task Something that needs to be done, but not a story
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants