holidays.countries.united_kingdom

Classes

GB(*args, **kwargs)

param years:

GBR(*args, **kwargs)

param years:

UK(*args, **kwargs)

param years:

UnitedKingdom(*args, **kwargs)

References: - https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom - https://archive.org/details/treatiseonbanki00walk/page/334/mode/2up - https://www.gov.uk/bank-holidays - https://www.timeanddate.com/holidays/uk/

UnitedKingdomStaticHolidays()

class holidays.countries.united_kingdom.UnitedKingdom(*args, **kwargs)

Bases: ObservedHolidayBase, ChristianHolidays, InternationalHolidays, StaticHolidays

References: - https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom - https://archive.org/details/treatiseonbanki00walk/page/334/mode/2up - https://www.gov.uk/bank-holidays - https://www.timeanddate.com/holidays/uk/

The Anniversary of the Battle of the Boyne bank holiday is proclaimed annually by the Secretary of State for Northern Ireland.

In-Lieu observance was first provided in the Bank Holidays Extension Act 1875.

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 = 'GB'

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

observed_label = '%s (observed)'
subdivisions: Tuple | Tuple[str, ...] = ('ENG', 'NIR', 'SCT', 'WLS')

The subdivisions supported for this country (see documentation).

class holidays.countries.united_kingdom.UK(*args, **kwargs)

Bases: UnitedKingdom

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.united_kingdom.GB(*args, **kwargs)

Bases: UnitedKingdom

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.united_kingdom.GBR(*args, **kwargs)

Bases: UnitedKingdom

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.united_kingdom.UnitedKingdomStaticHolidays

Bases: object

special_public_holidays = {1977: (6, 7, 'Silver Jubilee of Elizabeth II'), 1981: (7, 29, 'Wedding of Charles and Diana'), 1999: (12, 31, 'Millennium Celebrations'), 2002: (6, 3, 'Golden Jubilee of Elizabeth II'), 2011: (4, 29, 'Wedding of William and Catherine'), 2012: (6, 5, 'Diamond Jubilee of Elizabeth II'), 2022: ((6, 3, 'Platinum Jubilee of Elizabeth II'), (9, 19, 'State Funeral of Queen Elizabeth II')), 2023: (5, 8, 'Coronation of Charles III')}