| Modifier and Type | Method and Description |
|---|---|
static int |
getIsoWeekNumber(Temporal temporal)
Returns the ISO 8601 week number of the given temporal.
|
static boolean |
isHoliday(Temporal temporal,
GeoRegion region,
EnumSet<HolidayType> types)
Checks whether the given temporal is a holiday of any of the given types in the given region.
|
static boolean |
isPublicHoliday(Temporal temporal,
GeoRegion region)
Checks whether the given temporal is a public holiday in the given region.
|
static boolean |
isSchoolHoliday(Temporal temporal,
GeoRegion region)
Checks whether the given date is a school holiday in the given region.
|
static boolean |
isWeekend(Temporal temporal,
GeoRegion region)
Checks whether the given temporal is a weekend in the given region.
|
static boolean |
isWorkingDay(Temporal temporal,
GeoRegion region)
Checks whether the given temporal is a working day in the given region.
|
static void |
registerCustomHolidayPredicate(String countryCode,
HolidayPredicate predicate)
Registers a custom predicate for determining holidays in the given country.
|
static void |
registerCustomWeekendPredicate(String countryCode,
GeoTemporalPredicate predicate)
Registers a custom predicate for determining weekends in the given country.
|
static void |
registerCustomWorkingDayPredicate(String countryCode,
GeoTemporalPredicate predicate)
Registers a custom predicate for determining working days in the given country.
|
public static int getIsoWeekNumber(Temporal temporal)
IllegalArgumentException - if temporal is nullpublic static boolean isHoliday(Temporal temporal, GeoRegion region, EnumSet<HolidayType> types)
IllegalArgumentException - if temporal is nullIllegalArgumentException - if region is nullIllegalArgumentException - if types is nullGeoRegionNotSupportedException - if the region is not supportedpublic static boolean isPublicHoliday(Temporal temporal, GeoRegion region)
Only considers public holidays (HolidayType.PUBLIC).
To customise the holiday types, use isHoliday(Temporal, GeoRegion, EnumSet) instead.
IllegalArgumentException - if temporal is nullIllegalArgumentException - if region is nullGeoRegionNotSupportedException - if the region is not supportedpublic static boolean isSchoolHoliday(Temporal temporal, GeoRegion region)
Only considers school holidays (HolidayType.SCHOOLS_AND_UNIVERSITIES_ONLY and HolidayType.SCHOOLS_ONLY).
To customise the holiday types, use isHoliday(Temporal, GeoRegion, EnumSet) instead.
IllegalArgumentException - if temporal is nullIllegalArgumentException - if region is nullGeoRegionNotSupportedException - if the region is not supportedpublic static boolean isWeekend(Temporal temporal, GeoRegion region)
IllegalArgumentException - if temporal is nullIllegalArgumentException - if region is nullGeoRegionNotSupportedException - if the region is not supportedpublic static boolean isWorkingDay(Temporal temporal, GeoRegion region)
IllegalArgumentException - if temporal is nullIllegalArgumentException - if region is nullGeoRegionNotSupportedException - if the region is not supportedpublic static void registerCustomHolidayPredicate(String countryCode, HolidayPredicate predicate)
IllegalArgumentException - if countryCode is nullIllegalArgumentException - if predicate is nullpublic static void registerCustomWeekendPredicate(String countryCode, GeoTemporalPredicate predicate)
IllegalArgumentException - if countryCode is nullIllegalArgumentException - if predicate is nullpublic static void registerCustomWorkingDayPredicate(String countryCode, GeoTemporalPredicate predicate)
IllegalArgumentException - if countryCode is nullIllegalArgumentException - if predicate is null