[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    RFR: 8154520: java.time: appendLocalizedOffset() should return the localized "GMT" string
From:       Thejasvi Voniadka <thejasvi.v.voniadka () oracle ! com>
Date:       2019-06-28 12:59:56
Message-ID: 8ec24050-0c2a-4f2d-88e6-a3fba5d40e12 () default
[Download RAW message or body]

Hi,

Request you to please review this change.


JBS:    https://bugs.openjdk.java.net/browse/JDK-8154520


Description:    At present, the "DateTimeFormatterBuilder.appendLocalizedOf=
fset()" method formulates the base string as "GMT", without accounting for =
locale-specific transformations. This change is to return the localized ver=
sion of "GMT" instead. So for example, instead of returning "GMT +5.30", it=
 may now return "XXXX +5.30" where "XXXX" is the localized string for "GMT"=
 for the locale associated with the formatter. I have used DateTimeTextProv=
ider.getLocalizedResource() method to return the "gmtZeroFormat" value from=
 CLDR/LDML corresponding to the given locale. The code defaults to "GMT" in=
 the absence of such a localized value.


Webrev:    http://cr.openjdk.java.net/~vagarwal/8154520/webrev.1/


Additional notes:    I preferred to update and reuse an existing test inste=
ad of creating a new one. It already has the niceties in place, and creatin=
g another method would mean some amount of code redundancy. However, if tha=
t's the recommended norm, then I can change it.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic