-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add date of birth field #42
Add date of birth field #42
Conversation
* 'master' of https://github.com/AY2021S1-CS2103T-F13-3/tp: Update User Guide Add foojingyi profile photo
* 'master' of https://github.com/AY2021S1-CS2103T-F13-3/tp: Update homepage for project website Update DG Fix bug in NameContainsKeywordsPredicateTest.java after adding Weight field Fix bug in Person class constructor Update more existing tests to include weight field Update existing tests to support new Weight field, Add 3 new tests for Weight class under WeightTest.java add weight field to person
* master: Update homepage for project website Update DG Fix bug in NameContainsKeywordsPredicateTest.java after adding Weight field Fix bug in Person class constructor Update more existing tests to include weight field Update existing tests to support new Weight field, Add 3 new tests for Weight class under WeightTest.java add weight field to person
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.
Some minor refactoring and changes to comments. Almost good to merge.
public static final String VALID_DOB_AMY = "14-02-1997"; | ||
public static final String VALID_DOB_BOB = "11-11-2001"; |
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 it is better to name it VALID_DATE_OF_BIRTH_AMY and VALID_DATE_OF_BIRTH_BOB to keep it consistent with the current style, where the full class name is used instead of abbreviations?
public static final String DOB_DESC_AMY = " " + PREFIX_DOB + VALID_DOB_AMY; | ||
public static final String DOB_DESC_BOB = " " + PREFIX_DOB + VALID_DOB_BOB; |
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 it is better to name it DATE_OF_BIRTH_DESC_AMY and DATE_OF_BIRTH_DESC_BOB?
@@ -65,6 +70,7 @@ | |||
|
|||
public static final String INVALID_IC_DESC = " " + PREFIX_IC + "A222223HH"; | |||
public static final String INVALID_NAME_DESC = " " + PREFIX_NAME + "James&"; // '&' not allowed in names | |||
public static final String INVALID_DOB_DESC = " " + PREFIX_DOB + "31/12/95"; // '-' should be used instead of '/' |
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.
Maybe it is better to use the full class name for clarity?
A good case of invalid check since '/' is quite a common way of inputting dates.
src/test/java/seedu/address/logic/parser/AddCommandParserTest.java
Outdated
Show resolved
Hide resolved
src/test/java/seedu/address/logic/parser/EditCommandParserTest.java
Outdated
Show resolved
Hide resolved
Remove trailing whitespaces for checkstyle
Remove trailing whitespace on line 51
Wrap to keep within 120 chars
Remove trailing whitespace on line 48
Checkstyle
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.
LGTM
Added Date Of Birth class and support for a date of birth field.
Resolves #7 .