-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
9
In it_CH.xml, shows below contributed properties for month stand-alone wide value. Java doesn't get this value, but fallback to its parentLocale 'it' and returns 'Gennaio' which is in it.xml
In it_CH.xml
<calendar type="gregorian">
<months>
<monthContext type="stand-alone">
<monthWidth type="wide">
<month type="1" draft="contributed">gennaio</month>
But Java output is " Gennaio", instead of "gennaio".
Use below code to get Java's output.
---------------------------------------------
String tag = "it-CH";
Locale target = Locale.forLanguageTag(tag);
MonthDay date = MonthDay.of(Integer.parseInt("1"), Integer.parseInt("5"));
String mPattern="LLLL";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(mPattern, target);
formatter = formatter.withLocale(target);
String actualResult = date.format(formatter);
System.out.println(actualResult );
-------------------------------------------------------
In it_CH.xml
<calendar type="gregorian">
<months>
<monthContext type="stand-alone">
<monthWidth type="wide">
<month type="1" draft="contributed">gennaio</month>
But Java output is " Gennaio", instead of "gennaio".
Use below code to get Java's output.
---------------------------------------------
String tag = "it-CH";
Locale target = Locale.forLanguageTag(tag);
MonthDay date = MonthDay.of(Integer.parseInt("1"), Integer.parseInt("5"));
String mPattern="LLLL";
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(mPattern, target);
formatter = formatter.withLocale(target);
String actualResult = date.format(formatter);
System.out.println(actualResult );
-------------------------------------------------------