string-format: String.format/formatted/printf cheat sheet module (specifier anatomy, rounding vs C printf, locales, Indian lakh/crore grouping Formatter cannot do, format exceptions, %t dates, concat cost), 11 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7Sr2zcoRD2watXv1G
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
== %t suffixes on a LocalDateTime ==
|
||||
2026-11-12 | 09:05:07 | 09:05 | 11/12/26
|
||||
Thursday, 12 November 2026
|
||||
09:05 AM
|
||||
|
||||
== the same suffixes, other locales (names are localized, numbers are not) ==
|
||||
Donnerstag, 12. November 2026
|
||||
jeudi 12 novembre 2026
|
||||
|
||||
== a LocalDate has no hour ==
|
||||
IllegalFormatConversionException: H != java.time.LocalDate
|
||||
|
||||
== DateTimeFormatter does the same job with a reusable, immutable object ==
|
||||
12 Nov 2026 09:05
|
||||
Reference in New Issue
Block a user