Package org.elasticsearch.common.time
Class IsoCalendarDataProvider
java.lang.Object
java.util.spi.LocaleServiceProvider
java.util.spi.CalendarDataProvider
org.elasticsearch.common.time.IsoCalendarDataProvider
This class is loaded by JVM SPI mechanism in order to provide ISO compatible behaviour for week calculations using java.time.
It defines start of the week as Monday and requires 4 days in the first week of the year.
This class overrides default behaviour for Locale.ROOT (start of the week Sunday, minimum 1 day in the first week of the year).
Java SPI mechanism requires java.locale.providers to contain SPI value (i.e. java.locale.providers=SPI,COMPAT)
- See Also:
- ISO week date
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLocale[]
int
getFirstDayOfWeek(Locale locale)
int
getMinimalDaysInFirstWeek(Locale locale)
Methods inherited from class java.util.spi.LocaleServiceProvider
isSupportedLocale
-
Constructor Details
-
IsoCalendarDataProvider
public IsoCalendarDataProvider()
-
-
Method Details
-
getFirstDayOfWeek
- Specified by:
getFirstDayOfWeek
in classCalendarDataProvider
-
getMinimalDaysInFirstWeek
- Specified by:
getMinimalDaysInFirstWeek
in classCalendarDataProvider
-
getAvailableLocales
- Specified by:
getAvailableLocales
in classLocaleServiceProvider
-