Return value of DateFormatSymbols.getWeekdays() (original) (raw)
Roger Riggs Roger.Riggs at oracle.com
Tue Nov 5 14:30:54 UTC 2019
- Previous message: Return value of DateFormatSymbols.getWeekdays()
- Next message: Return value of DateFormatSymbols.getWeekdays()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
Please create an issue in the Jira (https://bugs.openjdk.java.net).
The appropriate email alias is: core-libs-dev at 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
Calendar.SUNDAY
, *Calendar.MONDAY
, etc. * The elementweekdays[0]
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
- Previous message: Return value of DateFormatSymbols.getWeekdays()
- Next message: Return value of DateFormatSymbols.getWeekdays()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]