PublicHolidayDayInfoProvider

class PublicHolidayDayInfoProvider(calendar: HolidayCalendar, subdivision: String? = null, language: String? = null, types: Set<HolidayType> = setOf(HolidayType.Public, HolidayType.Bank)) : DayInfoProvider

DayInfoProvider that marks the holidays of calendar: DayInfo.label is the holiday name, DayInfo.isHoliday is true and DayInfo.priority is DayInfoPriority.PUBLIC_HOLIDAY, so it wins the label when combined with +, for example PublicHolidayDayInfoProvider(PublicHolidays.forCountry("US")!!) + LunarDayInfoProvider().

DayInfo.tags holds "holiday", the lower-case HolidayType and, when they apply, "substitute" and "estimated". DayInfo.payload is the List<PublicHoliday> on that date in rule order; the label comes from the first one.

Parameters

subdivision

ISO 3166-2 code (e.g. "DE-BY") whose regional holidays are added.

language

BCP-47 language for names; falls back to English.

types

Holiday types to show.

Constructors

Link copied to clipboard
constructor(calendar: HolidayCalendar, subdivision: String? = null, language: String? = null, types: Set<HolidayType> = setOf(HolidayType.Public, HolidayType.Bank))

Functions

Link copied to clipboard
open override fun info(date: LocalDate): DayInfo?
Link copied to clipboard
open operator fun plus(other: DayInfoProvider): DayInfoProvider