Add support to date parsing out-of-the-box #124
Merged
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.
This adds support to convert string values into additional target types inside the
ParseFactory
:java.sql.Date
such as"2007-12-03"
java.sql.Timestamp
such as"2007-12-03 10:15:30.998"
java.time.DayOfWeek
such as"FRIDAY"
java.time.Duration
such as"PT15M"
(15 minutes)java.time.Instant
such as"2007-12-03T13:15:30Z"
java.time.LocalDate
such as"2007-12-03"
java.time.LocalDateTime
such as"2007-12-03T10:15:30"
java.time.Month
such as"DECEMBER"
java.time.OffsetDateTime
such as"2007-12-03T10:15:30-03:00"
java.time.ZonedDateTime
such as"2007-12-03T10:15:30-03:00[America/Sao_Paulo]"
java.util.Date
such as"2007-12-03T10:15:30+01:00"
(accepting valid date-time representations in RFC 3339 formats)So, the mappers
PropertiesToObjectMapper<T>
andINIToObjectMapper<T>
can also produce beans containing fields from the abovementioned types.