holidays.countries.portugal
Classes
|
|
|
|
|
A subclass of |
- class holidays.countries.portugal.Portugal(*args, **kwargs)
Bases:
HolidayBase
,ChristianHolidays
,InternationalHolidays
A subclass of
HolidayBase
representing public holidays in Portugal.- References:
Portugal Day - Decreto 17.171
Restoration of Independence Day - Gazeta de Lisboa, 8 de Dezembro de 1823 (n.º 290), pp. 1789 e 1790
- 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).
prov – deprecated use subdiv instead.
state – deprecated 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 = 'PT'
The country’s ISO 3166-1 alpha-2 code.
- default_language: str | None = 'pt_PT'
The entity language used by default.
- supported_categories: Tuple[str, ...] = ('optional', 'public')
All holiday categories supported by this entity.
- subdivisions: Tuple[str, ...] = ('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '20', '30')
The subdivisions supported for this country (see documentation).
- supported_languages: Tuple[str, ...] = ('en_US', 'pt_PT', 'uk')
All languages supported by this entity.
- class holidays.countries.portugal.PT(*args, **kwargs)
Bases:
Portugal
- 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).
prov – deprecated use subdiv instead.
state – deprecated 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.portugal.PRT(*args, **kwargs)
Bases:
Portugal
- 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).
prov – deprecated use subdiv instead.
state – deprecated 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.