Hi,

Please create an issue in the Jira (https://bugs.openjdk.java.net).

The appropriate email alias  is:
   core-libs-dev@openjdk.java.net

Thanks, Roger

On 11/5/19 1:31 AM, Wang Zhuo(Zhuoren) wrote:
Hi,
I am an engineer from Alibaba, and I have a question for return value of 
DateFormatSymbols.getWeekdays().
When using DateFormatSymbols.getInstance(Locale.ROOT).getWeekdays(), on JDK13 
or JDK11u we get short names, such as Sun, Mon. While I think the return value 
should be full names, such as Sunday, Monday. The comments of this method also 
indicate full names.
DateFormatSymbols.java:
     /**
      * Weekday strings. For example: "Sunday", "Monday", etc.  An array
      * of 8 strings, indexed by <code>Calendar.SUNDAY</code>,
      * <code>Calendar.MONDAY</code>, etc.
      * The element <code>weekdays[0]</code> is ignored.
      * @serial
      */
     String weekdays[] = null;

This issue only exists in Local.ROOT, 
DateFormatSymbols.getInstance(Locale.US).getWeekdays() returns full names.
I think it makes sense to return full names not short ones for Local.ROOT. 
What's your opinion?

It seems this issue is caused by abbreviated and wide dayWidth are set the same 
value in root.xml. I made a patch for this, please also review it 
http://cr.openjdk.java.net/~wzhuo/getWeekdays//webrev.00/

Regards,
Zhuoren






Reply via email to