Document basics for @⁠DateTimeFormat options

master
Sam Brannen 1 year ago
parent
commit
ff9d0fdfa9
  1. 4
      Date-and-Time-Formatting-with-JDK-20-and-higher.md

4
Date-and-Time-Formatting-with-JDK-20-and-higher.md

@ -43,7 +43,9 @@ The following sections provide guidance on lenient parsing for `@DateTimeFormat` @@ -43,7 +43,9 @@ The following sections provide guidance on lenient parsing for `@DateTimeFormat`
#### Lenient `@DateTimeFormat` Configuration
TODO
As mentioned previously in this document, the Spring team recommends the use of ISO standardized formats or concrete patterns for both parsing and formatting of date/time values whenever possible. For time values, this can be achieved via `@DateTimeFormat(iso = ISO.TIME)` (which uses the `HH:mm:ss.SSSXXX` pattern) or `@DateTimeFormat(pattern = "h:mm a")` (which uses the `h:mm a` pattern that is compatible with `java.text.DateFormat.SHORT` and Spring's `-S` style for parsing and formatting time values, prior to the changes introduced in CLDR 42).
> **TODO** Document benefits of `fallbackPatterns` in `@DateTimeFormat`.
#### Lenient `SimpleDateFormat` and `DateTimeFormatter` Configuration

Loading…
Cancel
Save