Merged
Conversation
…hrs, int min, int sec)
thuydunq
suggested changes
Oct 15, 2017
Contributor
thuydunq
left a comment
There was a problem hiding this comment.
Please add test for getYear setYear with year 4000.
Please re-check Date class from Java to verify.
Please shorten test for get/set test case.
| /** | ||
| * Convert the time seconds to String | ||
| * | ||
| * @param pattern |
Contributor
There was a problem hiding this comment.
Please add comment for tm *timeManagement
java/util/Date/Date.hpp
Outdated
| static int getSequenceNumber(const String &inputString, int &indexStart); | ||
|
|
||
| /** | ||
| * Get Current Sequence Char From InputString From InputString |
Contributor
There was a problem hiding this comment.
Duplicate "From InputString"
java/util/Date/Date.hpp
Outdated
| * | ||
| * @param inputString | ||
| * @param indexStart | ||
| * @return string |
java/util/Date/Date.hpp
Outdated
| /** | ||
| * Get time offset in second from local time zone to UTC | ||
| * | ||
| * @return time offset in second |
java/util/Date/Date.hpp
Outdated
|
|
||
| /** | ||
| * Returns a hash code value for this object. | ||
| * @return |
java/util/Date/Date.cpp
Outdated
|
|
||
| inputString = Date::removeBracket(inputString); | ||
|
|
||
| int limit = inputString.length(); |
java/util/Date/Date.cpp
Outdated
| continue; | ||
| } | ||
| if (currentChar >= '0' && currentChar <='9') { | ||
| int curentNumber = Date::getSequenceNumber(inputString, index); |
java/util/Date/DateTest.cpp
Outdated
|
|
||
| // year < 1900 | ||
| date.setYear(1889); | ||
| assertEquals(3789, date.getYear()); |
java/util/Date/DateTest.cpp
Outdated
|
|
||
| // year < 0 | ||
| date.setYear(-1); | ||
| assertEquals(1899, date.getYear()); |
java/util/Date/DateTest.cpp
Outdated
|
|
||
| // year = 0 | ||
| date.setYear(0); | ||
| assertEquals(1900, date.getYear()); |
dthongvl
approved these changes
Oct 17, 2017
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove old source.
Build + add test for java.util.Date