datetimeformatter: DateTimeFormatter cheat sheet module (pattern letters incl. the four hour letters, yyyy vs YYYY week-year bug and WeekFields, en_IN locales and the U+202F AM/PM trap with parseLenient fix, SMART/STRICT/LENIENT parsing, ISO constants, SimpleDateFormat thread safety), 18 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b3fvyFpxThdRxcozLx
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
hour pattern on a LocalDate UnsupportedTemporalTypeException: Unsupported field: HourOfDay
|
||||
zone pattern on a LocalDateTime DateTimeException: Unable to extract ZoneId from temporal 2026-11-14T01:17
|
||||
unknown pattern letter 'b' IllegalArgumentException: Unknown pattern letter: b
|
||||
unterminated quote IllegalArgumentException: Pattern ends with an incomplete string literal: uuuu-MM-dd'T
|
||||
the T in an ISO pattern, unquoted IllegalArgumentException: Unknown pattern letter: T
|
||||
the T in an ISO pattern, quoted OK: 2026-11-14T01:17
|
||||
text too short DateTimeParseException: Text '2026-11' could not be parsed at index 7
|
||||
text too long DateTimeParseException: Text '2026-11-14 extra' could not be parsed, unparsed text found at index 10
|
||||
date-only text into a LocalDateTime DateTimeParseException: Text '2026-11-14' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2026-11-14 of type java.time.format.Parsed
|
||||
month name in the wrong language DateTimeParseException: Text '14 novembre 2026' could not be parsed at index 3
|
||||
same text, French locale OK: 2026-11-14
|
||||
Reference in New Issue
Block a user