holidays.countries.tanzania
Classes
- class holidays.countries.tanzania.Tanzania(*args, **kwargs)
Bases:
HolidayBase
,ChristianHolidays
,InternationalHolidays
,IslamicHolidays
,StaticHolidays
References: - https://old.tanzlii.org/tz/legislation/act/1962/48/ # 1962 - https://old.tanzlii.org/tz/legislation/act/1964/52/ # 1964 - https://old.tanzlii.org/tz/legislation/act/1966/39/ # 1966 - https://www.parliament.go.tz/polis/uploads/bills/acts/1566639469-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20Act,%201993.pdf # 1993 # noqa: E501 - https://www.parliament.go.tz/polis/uploads/bills/acts/1566638051-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20(No.%202)%20Act,%201994.pdf # 1994 # noqa: E501 - http://parliament.go.tz/polis/uploads/bills/acts/1454076376-ActNo-25-2002.pdf # 2002 - https://en.wikipedia.org/wiki/Public_holidays_in_Tanzania - http://mytanzaniatimes.blogspot.com/2014/08/holiday-nane-nane-farmers-day-in.html - https://www.theeastafrican.co.ke/tea/business/tanzania-declares-public-holiday-on-census-day-3918836 # noqa: E501 - https://www.dw.com/en/samia-suluhu-hassan-who-is-tanzanias-new-president/a-56932264
Checked With: - https://www.bot.go.tz/webdocs/Other/2023%20public%20holidays.pdf # 2023 - https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202022.pdf # 2022 - https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202021.pdf # 2021 - https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202020.pdf # 2020 - https://issamichuzi.blogspot.com/2017/11/sikukuu-za-kitaifa-zenye-mapumziko-kwa.html # 2018 - https://www.timeanddate.com/holidays/tanzania/ (from 2013 onwards)
Limitations:
- Only works from 1994 onwards due to the lack of sources for certain legislation:
Government Notices No. 79 of 1977 Government Notices No. 300 of 1985 Government Notices No. 296 of 1994
Exact Islamic holidays dates are only available for 2013-2023; the rest are estimates.
- 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 = 'TZ'
The country’s ISO 3166-1 alpha-2 code.
- supported_categories: Tuple[str, ...] = ('bank', 'public')
All holiday categories supported by this entity.
- default_language: str | None = 'sw'
The entity language used by default.
- estimated_label = '%s (makisio)'
- supported_languages: Tuple[str, ...] = ('en_US', 'sw')
All languages supported by this entity.
- class holidays.countries.tanzania.TZ(*args, **kwargs)
Bases:
Tanzania
- 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.tanzania.TZA(*args, **kwargs)
Bases:
Tanzania
- 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.tanzania.TanzaniaIslamicHolidays
Bases:
_CustomIslamicHolidays
- EID_AL_ADHA_DATES_CUSTOM_CALENDAR = {2013: (10, 15), 2014: (10, 5), 2015: (9, 23), 2016: (9, 16), 2017: (9, 2), 2018: (8, 22), 2019: (8, 13), 2020: (7, 31), 2021: (7, 21), 2022: (7, 10), 2023: (6, 29)}
- EID_AL_FITR_DATES_CUSTOM_CALENDAR = {2013: (8, 8), 2014: (7, 29), 2015: (7, 18), 2016: (7, 7), 2017: (6, 26), 2018: (6, 15), 2019: (6, 5), 2020: (5, 24), 2021: (5, 14), 2022: (5, 3), 2023: (4, 22), 2024: (4, 10)}
- MAWLID_DATES_CUSTOM_CALENDAR = {2013: (1, 24), 2014: (1, 14), 2015: ((1, 3), (12, 24)), 2016: (12, 12), 2017: (12, 1), 2018: (11, 21), 2019: (11, 10), 2020: (10, 29), 2021: (10, 19), 2022: (10, 9), 2023: (9, 28)}
- class holidays.countries.tanzania.TanzaniaStaticHolidays
Bases:
object
- john_magufuli_inauguration = 'Sikukuu ya Kuapishwa kwa John Pombe Magufuli'
- tz_election_day = 'Sikukuu ya Uchaguzi Mkuu wa Tanzania'
- phc_census_day = 'Siku ya Sensa ya Kitaifa ya Watu na Makazi'
- john_magufuli_funeral = 'Mazishi cha John Pombe Magufuli'
- special_public_holidays = {2002: (8, 25, 'Siku ya Sensa ya Kitaifa ya Watu na Makazi'), 2015: (11, 5, 'Sikukuu ya Kuapishwa kwa John Pombe Magufuli'), 2020: (10, 28, 'Sikukuu ya Uchaguzi Mkuu wa Tanzania'), 2021: ((3, 22, 'Mazishi cha John Pombe Magufuli'), (3, 25, 'Mazishi cha John Pombe Magufuli')), 2022: (8, 23, 'Siku ya Sensa ya Kitaifa ya Watu na Makazi')}