holidays.countries.cuba

Classes

CU(*args, **kwargs)

param years:

CUB(*args, **kwargs)

param years:

Cuba(*args, **kwargs)

Overview: https://en.wikipedia.org/wiki/Public_holidays_in_Cuba 1984 (DEC 28): https://bit.ly/3okNBbt 2007 (NOV 19): https://bit.ly/3oFbhaZ 2013 (DEC 20): https://bit.ly/3zoO3vC Note: for holidays that can be moved to a Monday if they fall on a Sunday, between 1984 and 2013, the State Committee of Work and Social Security would determine if they would be moved to the Monday, or if they would stay on the Sunday, presumably depending on quotas.

class holidays.countries.cuba.Cuba(*args, **kwargs)

Bases: ObservedHolidayBase, ChristianHolidays, InternationalHolidays

Overview: https://en.wikipedia.org/wiki/Public_holidays_in_Cuba 1984 (DEC 28): https://bit.ly/3okNBbt 2007 (NOV 19): https://bit.ly/3oFbhaZ 2013 (DEC 20): https://bit.ly/3zoO3vC Note: for holidays that can be moved to a Monday if they fall on a Sunday, between 1984 and 2013, the State Committee of Work and Social Security would determine if they would be moved to the Monday, or if they would stay on the Sunday, presumably depending on quotas. After 2013, they always move to Monday. I could not find any records of this, so I implemented this making it always go to the next Monday.

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

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

default_language: str | None = 'es'

The entity language used by default.

observed_label = '%s (observado)'
supported_languages: Tuple[str, ...] = ('en_US', 'es', 'uk')

All languages supported by this entity.

class holidays.countries.cuba.CU(*args, **kwargs)

Bases: Cuba

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.cuba.CUB(*args, **kwargs)

Bases: Cuba

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.