On Tue, 7 Nov 2023 15:04:16 GMT, Roger Riggs <[email protected]> wrote:
>> While it might be reasonable to localize using `getMinusSign()` this will
>> introduce a new inconsistency with `DateTimeFormatter` (which *does not*
>> localize minus signs in front of years):
>>
>> int minus = DecimalFormatSymbols.getInstance(Locale.forLanguageTag("eu-ES"))
>> .getMinusSign()
>> minus ==> 8722
>>
>> int first = DateTimeFormatter.ISO_DATE
>> .withLocale(Locale.forLanguageTag("eu-ES"))
>> .format(ZonedDateTime.now()
>> .minus(4000, java.time.temporal.ChronoUnit.YEARS)
>> .charAt(0)
>> first ==> 45
>
> Within java.util.Formatter, the year formatter supports only the range
> [0,9999].
> Only ISO_STANDARD_DATE has a ISO 8601 format defined for numbers outside that
> range.
> The formatting in java.time is defined over the full range of years.
I think it is more reasonable for ISO_STANDARD_DATE to be consistent with
java.time.DateTimeFormatter, ISO 8601 format is not localized.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16033#discussion_r1385083995