-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for java.time.YearMonth (#255)
* Add support for java.time.YearMonth * Custom private YearMonthFormatter * Add ScynamoDecoderTest for failing YearMonth
- Loading branch information
Showing
5 changed files
with
86 additions
and
23 deletions.
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package scynamo.wrapper | ||
|
||
import java.time.format.DateTimeFormatter | ||
|
||
/** This is a custom formatter for `YearMonth` because | ||
* "Years outside the range 0000 to 9999 must be prefixed by the plus or minus symbol." | ||
* but the plus symbol is not added by the default `.toString`. | ||
*/ | ||
private[scynamo] object YearMonthFormatter { | ||
final val yearMonthFormatter = DateTimeFormatter.ofPattern("uuuu-MM") | ||
} |
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
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