[10] RFR 8171049: Era.getDisplayName doesn't work with non-IsoChronology

Roger Riggs Roger.Riggs at Oracle.com
Fri Aug 25 18:03:18 UTC 2017


Hi,

Something like:

    DateTimeFormatterBuilder.DateTimeTextProvider
    .getInstance()
         .getText(ChronoField.ERA, value, style, locale);

Take a look at what TextPrinterParser.format does: line 3291.

Roger


On 8/25/2017 1:49 PM, Stephen Colebourne wrote:
> The formatter should be  a static constant in both cases - no need to
> create each time.
>
> I would have expected this to be done without using DateTimeFormatter
> however, just directly calling an internal API.
>
> Stephen
>
>
>
>
> On 25 August 2017 at 18:43, Naoto Sato <naoto.sato at oracle.com> wrote:
>> Hi,
>>
>> Please review the fix to the following issue:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8171049
>>
>> The proposed fix is located at:
>>
>> http://cr.openjdk.java.net/~naoto/8171049/webrev.00/
>>
>> The fix is to implement Era.getDisplayName() in each Era enum.
>>
>> Naoto



More information about the core-libs-dev mailing list