holidays.countries.spain

Classes

ES(*args, **kwargs)

param years:

ESP(*args, **kwargs)

param years:

Spain(*args, **kwargs)

Holidays checked with official sources for 2010-2023 only.

SpainIslamicHolidays()

SpainStaticHolidays()

class holidays.countries.spain.Spain(*args, **kwargs)

Bases: ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays

Holidays checked with official sources for 2010-2023 only.

References:

Labor Holidays: 2010: https://www.boe.es/buscar/doc.php?id=BOE-A-2009-18477 2011: https://www.boe.es/buscar/doc.php?id=BOE-A-2010-15722 2012: https://www.boe.es/buscar/doc.php?id=BOE-A-2011-16116 2013: https://www.boe.es/buscar/doc.php?id=BOE-A-2012-13644 2014: https://www.boe.es/buscar/doc.php?id=BOE-A-2013-12147 2015: https://www.boe.es/buscar/doc.php?id=BOE-A-2014-10823 2016: https://www.boe.es/buscar/doc.php?id=BOE-A-2015-11348 2017: https://www.boe.es/buscar/doc.php?id=BOE-A-2016-9244 2018: https://www.boe.es/buscar/doc.php?id=BOE-A-2017-11639 2019: https://www.boe.es/buscar/doc.php?id=BOE-A-2018-14369 2020: https://www.boe.es/buscar/doc.php?id=BOE-A-2019-14552 2021: https://www.boe.es/buscar/doc.php?id=BOE-A-2020-13343 2022: https://www.boe.es/buscar/doc.php?id=BOE-A-2021-17113 2023: https://www.boe.es/diario_boe/txt.php?id=BOE-A-2022-16755 2024: https://www.boe.es/buscar/doc.php?id=BOE-A-2023-22014

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

country: str = 'ES'

The country’s ISO 3166-1 alpha-2 code.

default_language: str | None = 'es'

The entity language used by default.

observed_label = 'Lunes siguiente a %s'
subdivisions: Tuple[str, ...] = ('AN', 'AR', 'AS', 'CB', 'CE', 'CL', 'CM', 'CN', 'CT', 'EX', 'GA', 'IB', 'MC', 'MD', 'ML', 'NC', 'PV', 'RI', 'VC')

The subdivisions supported for this country (see documentation).

supported_languages: Tuple[str, ...] = ('en_US', 'es', 'uk')

All languages supported by this entity.

class holidays.countries.spain.ES(*args, **kwargs)

Bases: Spain

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.spain.ESP(*args, **kwargs)

Bases: Spain

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

  • expand – Whether the entire year is calculated when one date from that year is requested.

  • observed – Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn’t work for all countries.

  • subdiv – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.spain.SpainIslamicHolidays

Bases: _CustomIslamicHolidays

EID_AL_ADHA_DATES_CUSTOM_CALENDAR = {2010: (11, 17), 2011: (11, 6), 2012: (10, 25), 2013: (10, 15), 2014: (10, 4), 2015: (9, 25), 2016: (9, 12), 2017: (9, 1), 2018: (8, 22), 2019: (8, 12), 2020: (7, 31), 2021: (7, 20), 2022: (7, 9), 2023: (6, 29), 2024: (6, 17)}
EID_AL_FITR_DATES_CUSTOM_CALENDAR = {2022: (5, 3), 2023: (4, 21)}
class holidays.countries.spain.SpainStaticHolidays

Bases: object

special_ga_public_holidays = {2015: (3, 20, 'Día siguiente a San José')}
special_md_public_holidays = {2013: (3, 18, 'Traslado de San José')}
special_pv_public_holidays = {2016: (10, 7, '80 Aniversario del primer Gobierno Vasco'), 2022: (9, 6, 'V Centenario Vuelta al Mundo')}
special_vc_public_holidays = {2013: (3, 18, 'Lunes de Fallas')}