holidays.countries.costa_rica

Classes

CR(*args, **kwargs)

param years:

CRI(*args, **kwargs)

param years:

CostaRica(*args, **kwargs)

References: - https://en.wikipedia.org/wiki/Public_holidays_in_Costa_Rica - http://www.pgrweb.go.cr/scij/avanzada_pgr.aspx - Law #8442 from 19.04.2005 - Law #8604 from 17.09.2007 - Law #8753 from 25.07.2009 - Law #8886 from 01.11.2010 - Law #9803 from 19.05.2020 - Law #10050 from 25.10.2021

class holidays.countries.costa_rica.CostaRica(*args, **kwargs)

Bases: ObservedHolidayBase, ChristianHolidays, InternationalHolidays

References: - https://en.wikipedia.org/wiki/Public_holidays_in_Costa_Rica - http://www.pgrweb.go.cr/scij/avanzada_pgr.aspx - Law #8442 from 19.04.2005 - Law #8604 from 17.09.2007 - Law #8753 from 25.07.2009 - Law #8886 from 01.11.2010 - Law #9803 from 19.05.2020 - Law #10050 from 25.10.2021

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

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_categories: Tuple[str, ...] = ('optional', 'public')

All holiday categories supported by this entity.

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

All languages supported by this entity.

class holidays.countries.costa_rica.CR(*args, **kwargs)

Bases: CostaRica

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.costa_rica.CRI(*args, **kwargs)

Bases: CostaRica

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.