holidays.countries.south_africa
Classes
|
https://www.gov.za/about-sa/public-holidays https://en.wikipedia.org/wiki/Public_holidays_in_South_Africa https://www.gov.za/speeches/president-cyril-ramaphosa-progress-economic-recovery-30-oct-2023-0000 https://www.gov.za/documents/notices/public-holidays-act-declaration-29-may-2024-public-holiday-23-feb-2024 |
|
|
|
|
- class holidays.countries.south_africa.SouthAfrica(*args, **kwargs)
Bases:
ObservedHolidayBase
,ChristianHolidays
,InternationalHolidays
,StaticHolidays
https://www.gov.za/about-sa/public-holidays https://en.wikipedia.org/wiki/Public_holidays_in_South_Africa https://www.gov.za/speeches/president-cyril-ramaphosa-progress-economic-recovery-30-oct-2023-0000 https://www.gov.za/documents/notices/public-holidays-act-declaration-29-may-2024-public-holiday-23-feb-2024
- 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 = 'ZA'
The country’s ISO 3166-1 alpha-2 code.
- observed_label = '%s (observed)'
- class holidays.countries.south_africa.ZA(*args, **kwargs)
Bases:
SouthAfrica
- 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.south_africa.ZAF(*args, **kwargs)
Bases:
SouthAfrica
- 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.south_africa.SouthAfricaStaticHolidays
Bases:
object
- local_elections = 'Local government elections'
- municipal_elections = 'Municipal elections'
- national_and_provincial_elections = 'National and provincial government elections'
- presidential_decree_holiday = 'Public holiday by presidential decree'
- y2k_changeover = 'Y2K changeover'
- special_public_holidays = {1999: ((6, 2, 'National and provincial government elections'), (12, 31, 'Y2K changeover')), 2000: (1, 2, 'Y2K changeover'), 2004: (4, 14, 'National and provincial government elections'), 2006: (3, 1, 'Local government elections'), 2008: (5, 2, 'Public holiday by presidential decree'), 2009: (4, 22, 'National and provincial government elections'), 2011: ((5, 18, 'Local government elections'), (12, 27, 'Public holiday by presidential decree')), 2014: (5, 7, 'National and provincial government elections'), 2016: ((8, 3, 'Local government elections'), (12, 27, 'Public holiday by presidential decree')), 2019: (5, 8, 'National and provincial government elections'), 2021: (11, 1, 'Municipal elections'), 2022: (12, 27, 'Public holiday by presidential decree'), 2023: (12, 15, 'Public holiday by presidential decree'), 2024: (5, 29, 'National and provincial government elections')}
- special_public_holidays_observed = {2000: (1, 3, 'Y2K changeover')}