With DateTimeFormatterBuilder, one could do
.toFormatter(locale)
to get the right localization options for things like months.
With a
LocalDateTime.Format
what is the equivalent?
Is it to create separate formatters and pick the right one manually by comparing our
locale
object? Smth like
when(locale.toString()) {
"..." -> monthDateAndTimeEn
"..." -> monthDateAndTimeSe
}
Where each formatter will do this manually, like
monthName(MonthNames.ENGLISH_ABBREVIATED)
,
monthName(MonthNames.SWEDISH_ABBREVIATED)
(where
MonthNames.SWEDISH_ABBREVIATED
would be a custom thing of course) etc?
Am I missing something obvious here? The formatter itself does not look to take in a locale in some other way