Schedule: Locales not fully respected
See original GitHub issueAll European locales have first day of the week Monday [link]. But e.g. Norwegian is stariting by Sunday (søn.) in p:schedule
component, which is wrong.
All, except EN schould be Mon:
PF version | EN | DE | SV | NO |
---|---|---|---|---|
8.0 | Sun | Mon | Mon | Sun |
8.0.2 | Sun | Mon | Mon | Sun |
8.0.5 | Sun | Mon | Mon | Sun |
snapshot* | Sun | Sun | Sun | Sun |
(*) primefaces-master-6_1-gf9d6444-4838.jar
-
FullCalendar demo is working correctly: https://fullcalendar.io/docs/locale-demo. E.g if I choose “nb” locale (nb - Norwegian Bokmål, nn - Norwegian Nynorsk), then week starts by monday (man.).
-
Setting of
p:schedule weekNumberCalculation
to “ISO” does not help, even if FullCalendar is saying “If weekNumberCalculation is set to ‘ISO’, this option defaults to 1 (Monday)”. https://fullcalendar.io/docs/firstDay
XHTML
<p:schedule id="myCalendarId"
view="agendaWeek"
rightHeaderTemplate="false"
value="#{scheduleController.eventModel}"
locale="#{scheduleController.locale}"
timeZone="#{scheduleController.timeZone}"
clientTimeZone="#{scheduleController.clientTimeZone}"
weekNumberCalculation="local"
showWeekends="true"
allDaySlot="false"
aspectRatio="1.2"
timeFormat="HH:mm">
</p:schedule>
ScheduleController.java
private static final String clientTimeZone = "local";
private static final Locale LOCALE_EN_US = new Locale("en", "US");
private static final Locale LOCALE_DE_DE = new Locale("de", "DE");
private static final Locale LOCALE_SV_SE = new Locale("sv", "SE");
private static final Locale LOCALE_NO_NO = new Locale("no", "NO");
public static final ZoneId ZONE_ID_UTC = ZoneId.of("UTC");
public static final ZoneId ZONE_ID_BERLIN = ZoneId.of("Europe/Berlin");
public static final ZoneId ZONE_ID_STOCKHOLM = ZoneId.of("Europe/Stockholm");
public static final ZoneId ZONE_ID_OSLO = ZoneId.of("Europe/Oslo");
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Programs not respecting locales - Unix & Linux Stack Exchange
Programs have to be written to respect the locale. For example if I write #!/bin/sh echo hello. and I run it with a...
Read more >Why is my "locale" not respecting default locale? - ubuntu
"Default" implies that there are other, higher-priority settings which locale respects first. The locale is not read directly from /etc/default ...
Read more >date() does not respect the current locale, while strftime() does
So what you're seeing is expected behavior. Use strftime() for locale formatted dates, and date() when that is not necessary.
Read more >Locale - ArchWiki
Locales are used by glibc and other locale-aware programs or libraries for rendering text, correctly displaying regional monetary values, ...
Read more >Locales and Resources | ICU Documentation
The locale mechanism does not require a program to know which locale the user is ... The variant code is arbitrary and completely...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I added an Integration Test to our suite so this is caught in the future.
OK I found the problem and fixed it. the
locales
need to be added now for FullCalendar to be aware of them