vaadin / cookbook

Copy & paste recipes for Vaadin
https://cookbook.vaadin.com/
Apache License 2.0
20 stars 38 forks source link

fix: fix initialization of I18N weekdays #332

Closed javier-godoy closed 2 months ago

javier-godoy commented 2 months ago

Description

As discussed in https://github.com/vaadin/flow-components/issues/6353#issuecomment-2175966174, the result of DateFormatSymbols.getWeekdays and DateFormatSymbols.getShortWeekdays returns 8 items instead of 7.

For example:

System.out.println(String.join(",", dfs.getWeekdays()));
System.out.println(String.join(",", dfs.getShortWeekdays()));

Prints:

,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
,Sun,Mon,Tue,Wed,Thu,Fri,Sat

Fixes #329

Type of change

Checklist

Additional for Feature type of change

marcushellberg commented 2 months ago

Apparently my review wasn't good enough. @Artur- do your thing