If your app shows dates to users in Spain, "is today a holiday" has 17 different answers, one per autonomous community, and the official lists come out region by region in 17 different bulletins between March and October of the year before. For 2027 we read all of them (BOE for the national dates, then BOA, BOC, BON, DOCM, DOGC and the rest) and packed the result into one npm package:
npm install spain-holidays const sh = require('spain-holidays'); sh.holidays('ES-MD'); // the 12 holidays of Madrid, sorted sh.isHoliday('2027-03-19', 'galicia'); // San José in Galicia, or null sh.nextHoliday('ES-CT'); // next holiday in Catalonia from today sh.source('ES-NC'); // the BON resolution Navarra's list comes from Region codes are ISO 3166-2 (ES-AN, ES-CT, ES-PV and so on); plain names work too, with or without accents. Zero dependencies, 5.6 kB packed, TypeScript types included, and every region object carries the label and URL of the bulletin it was taken from, so you can check any date yourself.
Things the data makes visible for 2027:
- 15 August is a Sunday. Six regions moved it to Monday 16 August (Andalucía, Aragón, Asturias, Canarias, Castilla y León, Madrid), Extremadura used the slot for 11 October, Castilla-La Mancha for 31 May, and the others simply lose the day
- 1 May and 25 December fall on Saturdays and are not moved anywhere
- Easter Monday (29 March) is a holiday in six regions, San José (19 March) in five
- Navarra is the only region with 13 dates, because 3 December is a holiday for the whole community
The same data is on GitHub as JSON, CSV and one ICS calendar per region (https://github.com/RB9744/spain-public-holidays), and on Kaggle (https://www.kaggle.com/datasets/rbkhanni/spain-public-holidays-2027-by-region) and Hugging Face (https://huggingface.co/datasets/Rbkhanni/spain-public-holidays-2027).
Local holidays (two per town) are not in the package; they are published municipality by municipality during the autumn and we keep them on the SueldoClaro region pages (https://sueldoclaro.es/calendario-laboral-2027/), which is the site the data was built for.
License CC BY 4.0. Ceuta and Melilla are missing for now; if you have the official 2027 text for either, open an issue.
