-
Notifications
You must be signed in to change notification settings - Fork 45
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
Improve SafeDateFormat by joda DateTimeFormatter #59
Conversation
@@ -45,7 +50,7 @@ public void testParse() { | |||
Assert.assertThrows(IllegalArgumentException.class, () -> { | |||
DateUtil.parse("2018-15-07 12:00:00"); | |||
}, e -> { | |||
Assert.assertContains(", expect format: ", e.getMessage()); | |||
Assert.assertContains("Value 15 for monthOfYear must be in the range [1,12]", e.getMessage()); |
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.
seems exceed 80 chars
return this.formatter.get().parse(source, pos); | ||
public void setLenient(boolean lenient) { | ||
// pass | ||
} |
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.
remove it
*/ | ||
public class SafeDateFormat extends DateFormat { | ||
@Deprecated |
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.
keep SafeDateFormat currently
eca8e82
to
b0d30ef
Compare
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
============================================
+ Coverage 81.76% 84.49% +2.73%
- Complexity 686 737 +51
============================================
Files 57 57
Lines 2089 2115 +26
Branches 304 316 +12
============================================
+ Hits 1708 1787 +79
+ Misses 251 188 -63
- Partials 130 140 +10
Continue to review full report at Codecov.
|
Fix #58