Module org.holiday.calendar.core
module org.holiday.calendar.core
Holiday Calendar core API module.
Provides the core abstractions for defining, building, and calculating
holiday calendars: Holiday (and its permitted subtypes, including
the EarlyCloseHoliday half-day close), HolidayCalendar,
HolidayCalendarService, HolidayCalendarFactory, and the
Observance/DateRoll functional interfaces used to plug in
per-region date calculation and weekend-rolling behavior. Regional
implementations (the western, apac, and mena
modules) depend on this module and register their
HolidayCalendarService providers via ServiceLoader.
Typical read-only usage — locate a calendar by code and calculate a year's holidays without depending on which module provides it:
HolidayCalendarFactory factory = new HolidayCalendarFactory();
HolidayCalendar xnys = factory.create("XNYS");
List<HolidayDate> holidays = xnys.calculate(2026);
List<HolidayDate> earlyCloses = xnys.calculateEarlyCloses(2026);
-
Packages
ExportsPackageDescriptionBase classes and interfaces of the Holiday Calendar API.Functional interfaces to support construction of filters and date calculation algorithms as lambda expressions.Base classes forObservanceimplementations, used throughout the regional calendar modules.Shared runtime utilities used byObservanceimplementations across the regional calendar modules.