holidays 0.78__py3-none-any.whl → 0.80__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. holidays/calendars/__init__.py +1 -0
  2. holidays/calendars/chinese.py +14 -4
  3. holidays/calendars/ethiopian.py +31 -0
  4. holidays/calendars/hindu.py +1 -0
  5. holidays/calendars/islamic.py +16 -4
  6. holidays/calendars/julian.py +14 -0
  7. holidays/calendars/mandaean.py +59 -0
  8. holidays/calendars/tibetan.py +1466 -0
  9. holidays/constants.py +2 -1
  10. holidays/countries/__init__.py +20 -0
  11. holidays/countries/afghanistan.py +6 -39
  12. holidays/countries/albania.py +3 -22
  13. holidays/countries/argentina.py +7 -18
  14. holidays/countries/australia.py +191 -295
  15. holidays/countries/azerbaijan.py +6 -39
  16. holidays/countries/bahrain.py +29 -38
  17. holidays/countries/bhutan.py +194 -0
  18. holidays/countries/bosnia_and_herzegovina.py +7 -28
  19. holidays/countries/brunei.py +7 -117
  20. holidays/countries/burkina_faso.py +9 -15
  21. holidays/countries/burundi.py +95 -40
  22. holidays/countries/cameroon.py +8 -34
  23. holidays/countries/canada.py +9 -1
  24. holidays/countries/central_african_republic.py +3 -16
  25. holidays/countries/chad.py +9 -17
  26. holidays/countries/chile.py +20 -4
  27. holidays/countries/christmas_island.py +10 -15
  28. holidays/countries/cocos_islands.py +5 -24
  29. holidays/countries/comoros.py +121 -0
  30. holidays/countries/egypt.py +5 -37
  31. holidays/countries/eritrea.py +104 -0
  32. holidays/countries/ethiopia.py +18 -47
  33. holidays/countries/fiji.py +1 -2
  34. holidays/countries/gabon.py +5 -23
  35. holidays/countries/gambia.py +168 -0
  36. holidays/countries/georgia.py +9 -7
  37. holidays/countries/guinea.py +5 -27
  38. holidays/countries/guinea_bissau.py +96 -0
  39. holidays/countries/guyana.py +2 -17
  40. holidays/countries/india.py +12 -25
  41. holidays/countries/indonesia.py +6 -158
  42. holidays/countries/iran.py +16 -126
  43. holidays/countries/iraq.py +276 -0
  44. holidays/countries/kazakhstan.py +2 -18
  45. holidays/countries/kenya.py +2 -8
  46. holidays/countries/kiribati.py +124 -0
  47. holidays/countries/kyrgyzstan.py +2 -0
  48. holidays/countries/lebanon.py +5 -87
  49. holidays/countries/liberia.py +80 -0
  50. holidays/countries/libya.py +5 -37
  51. holidays/countries/macau.py +65 -63
  52. holidays/countries/malaysia.py +9 -130
  53. holidays/countries/maldives.py +2 -0
  54. holidays/countries/mali.py +4 -9
  55. holidays/countries/mauritania.py +2 -0
  56. holidays/countries/mauritius.py +1 -2
  57. holidays/countries/montenegro.py +3 -18
  58. holidays/countries/nepal.py +42 -44
  59. holidays/countries/niger.py +14 -74
  60. holidays/countries/nigeria.py +198 -27
  61. holidays/countries/north_macedonia.py +3 -39
  62. holidays/countries/oman.py +6 -28
  63. holidays/countries/pakistan.py +5 -30
  64. holidays/countries/palestine.py +2 -5
  65. holidays/countries/philippines.py +3 -33
  66. holidays/countries/qatar.py +3 -45
  67. holidays/countries/rwanda.py +162 -0
  68. holidays/countries/saudi_arabia.py +3 -0
  69. holidays/countries/senegal.py +6 -16
  70. holidays/countries/sierra_leone.py +5 -21
  71. holidays/countries/singapore.py +7 -59
  72. holidays/countries/somalia.py +79 -0
  73. holidays/countries/south_georgia_and_the_south_sandwich_islands.py +160 -0
  74. holidays/countries/south_sudan.py +133 -0
  75. holidays/countries/spain.py +7 -10
  76. holidays/countries/sri_lanka.py +3 -14
  77. holidays/countries/suriname.py +11 -19
  78. holidays/countries/syrian_arab_republic.py +134 -0
  79. holidays/countries/tajikistan.py +116 -0
  80. holidays/countries/tanzania.py +291 -153
  81. holidays/countries/timor_leste.py +2 -17
  82. holidays/countries/togo.py +4 -29
  83. holidays/countries/trinidad_and_tobago.py +2 -9
  84. holidays/countries/turkey.py +2 -116
  85. holidays/countries/turkmenistan.py +164 -0
  86. holidays/countries/uganda.py +101 -0
  87. holidays/countries/united_arab_emirates.py +5 -29
  88. holidays/countries/uzbekistan.py +3 -31
  89. holidays/countries/yemen.py +8 -52
  90. holidays/financial/__init__.py +5 -0
  91. holidays/financial/national_stock_exchange_of_india.py +169 -0
  92. holidays/groups/__init__.py +2 -0
  93. holidays/groups/christian.py +48 -12
  94. holidays/groups/eastern.py +1 -1
  95. holidays/groups/international.py +17 -1
  96. holidays/groups/islamic.py +1 -1
  97. holidays/groups/mandaean.py +107 -0
  98. holidays/groups/tibetan.py +153 -0
  99. holidays/holiday_base.py +14 -0
  100. holidays/locale/ar/LC_MESSAGES/BH.mo +0 -0
  101. holidays/locale/ar/LC_MESSAGES/IQ.mo +0 -0
  102. holidays/locale/ar/LC_MESSAGES/SY.mo +0 -0
  103. holidays/locale/bs/LC_MESSAGES/BA.mo +0 -0
  104. holidays/locale/en_GM/LC_MESSAGES/GM.mo +0 -0
  105. holidays/locale/en_GS/LC_MESSAGES/GS.mo +0 -0
  106. holidays/locale/en_IN/LC_MESSAGES/XNSE.mo +0 -0
  107. holidays/locale/en_MO/LC_MESSAGES/MO.mo +0 -0
  108. holidays/locale/en_NG/LC_MESSAGES/NG.mo +0 -0
  109. holidays/locale/en_SG/LC_MESSAGES/SG.mo +0 -0
  110. holidays/locale/en_US/LC_MESSAGES/AR.mo +0 -0
  111. holidays/locale/en_US/LC_MESSAGES/BA.mo +0 -0
  112. holidays/locale/en_US/LC_MESSAGES/BH.mo +0 -0
  113. holidays/locale/en_US/LC_MESSAGES/BI.mo +0 -0
  114. holidays/locale/en_US/LC_MESSAGES/CL.mo +0 -0
  115. holidays/locale/en_US/LC_MESSAGES/ES.mo +0 -0
  116. holidays/locale/en_US/LC_MESSAGES/GE.mo +0 -0
  117. holidays/locale/en_US/LC_MESSAGES/GM.mo +0 -0
  118. holidays/locale/en_US/LC_MESSAGES/GS.mo +0 -0
  119. holidays/locale/en_US/LC_MESSAGES/GW.mo +0 -0
  120. holidays/locale/en_US/LC_MESSAGES/IQ.mo +0 -0
  121. holidays/locale/en_US/LC_MESSAGES/MO.mo +0 -0
  122. holidays/locale/en_US/LC_MESSAGES/NG.mo +0 -0
  123. holidays/locale/en_US/LC_MESSAGES/RW.mo +0 -0
  124. holidays/locale/en_US/LC_MESSAGES/SG.mo +0 -0
  125. holidays/locale/en_US/LC_MESSAGES/SY.mo +0 -0
  126. holidays/locale/en_US/LC_MESSAGES/TJ.mo +0 -0
  127. holidays/locale/en_US/LC_MESSAGES/TM.mo +0 -0
  128. holidays/locale/en_US/LC_MESSAGES/TZ.mo +0 -0
  129. holidays/locale/en_US/LC_MESSAGES/XNSE.mo +0 -0
  130. holidays/locale/es/LC_MESSAGES/AR.mo +0 -0
  131. holidays/locale/es/LC_MESSAGES/ES.mo +0 -0
  132. holidays/locale/fr/LC_MESSAGES/RW.mo +0 -0
  133. holidays/locale/fr_BI/LC_MESSAGES/BI.mo +0 -0
  134. holidays/locale/hi/LC_MESSAGES/XNSE.mo +0 -0
  135. holidays/locale/ka/LC_MESSAGES/GE.mo +0 -0
  136. holidays/locale/pt_GW/LC_MESSAGES/GW.mo +0 -0
  137. holidays/locale/pt_MO/LC_MESSAGES/MO.mo +0 -0
  138. holidays/locale/ru/LC_MESSAGES/TJ.mo +0 -0
  139. holidays/locale/ru/LC_MESSAGES/TM.mo +0 -0
  140. holidays/locale/rw/LC_MESSAGES/RW.mo +0 -0
  141. holidays/locale/sr/LC_MESSAGES/BA.mo +0 -0
  142. holidays/locale/sw/LC_MESSAGES/TZ.mo +0 -0
  143. holidays/locale/tg/LC_MESSAGES/TJ.mo +0 -0
  144. holidays/locale/th/LC_MESSAGES/MO.mo +0 -0
  145. holidays/locale/th/LC_MESSAGES/SG.mo +0 -0
  146. holidays/locale/tk/LC_MESSAGES/TM.mo +0 -0
  147. holidays/locale/uk/LC_MESSAGES/AR.mo +0 -0
  148. holidays/locale/uk/LC_MESSAGES/BA.mo +0 -0
  149. holidays/locale/uk/LC_MESSAGES/CL.mo +0 -0
  150. holidays/locale/uk/LC_MESSAGES/ES.mo +0 -0
  151. holidays/locale/uk/LC_MESSAGES/GE.mo +0 -0
  152. holidays/locale/zh_CN/LC_MESSAGES/MO.mo +0 -0
  153. holidays/locale/zh_MO/LC_MESSAGES/MO.mo +0 -0
  154. holidays/registry.py +46 -14
  155. holidays/version.py +1 -1
  156. {holidays-0.78.dist-info → holidays-0.80.dist-info}/METADATA +127 -9
  157. {holidays-0.78.dist-info → holidays-0.80.dist-info}/RECORD +161 -113
  158. {holidays-0.78.dist-info → holidays-0.80.dist-info}/licenses/CONTRIBUTORS +2 -0
  159. {holidays-0.78.dist-info → holidays-0.80.dist-info}/WHEEL +0 -0
  160. {holidays-0.78.dist-info → holidays-0.80.dist-info}/licenses/LICENSE +0 -0
  161. {holidays-0.78.dist-info → holidays-0.80.dist-info}/top_level.txt +0 -0
@@ -10,10 +10,25 @@
10
10
  # Website: https://github.com/vacanza/holidays
11
11
  # License: MIT (see LICENSE file)
12
12
 
13
+ from datetime import date
13
14
  from gettext import gettext as tr
14
15
 
15
16
  from holidays.calendars import _CustomIslamicHolidays
16
- from holidays.calendars.gregorian import JAN, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
17
+ from holidays.calendars.gregorian import (
18
+ JAN,
19
+ FEB,
20
+ MAR,
21
+ APR,
22
+ MAY,
23
+ JUN,
24
+ JUL,
25
+ AUG,
26
+ SEP,
27
+ OCT,
28
+ NOV,
29
+ DEC,
30
+ _timedelta,
31
+ )
17
32
  from holidays.constants import BANK, PUBLIC
18
33
  from holidays.groups import (
19
34
  ChristianHolidays,
@@ -21,40 +36,65 @@ from holidays.groups import (
21
36
  IslamicHolidays,
22
37
  StaticHolidays,
23
38
  )
24
- from holidays.holiday_base import HolidayBase
39
+ from holidays.observed_holiday_base import (
40
+ ObservedHolidayBase,
41
+ SAT_TO_NEXT_TUE,
42
+ SAT_SUN_TO_NEXT_MON,
43
+ SAT_SUN_TO_NEXT_MON_TUE,
44
+ )
25
45
 
26
46
 
27
47
  class Tanzania(
28
- HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays
48
+ ObservedHolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays, StaticHolidays
29
49
  ):
30
50
  """Tanzania holidays.
31
51
 
32
52
  References:
33
- * [1962](https://old.tanzlii.org/tz/legislation/act/1962/48/)
34
- * [1964](https://web.archive.org/web/20250426030228/http://www.parliament.go.tz/polis/uploads/bills/acts/1565172859-The%20Public%20Holidays%20Ordinance%20(amendment)%20Act,%201964.pdf)
35
- * [1966](https://web.archive.org/web/20241130122429/http://www.parliament.go.tz/polis/uploads/bills/acts/1565692654-The%20Public%20Holidays%20Ordinance%20(Amendment)%20Act,%201966.pdf)
36
- * [1993](https://web.archive.org/web/20250425095011/https://www.parliament.go.tz/polis/uploads/bills/acts/1566639469-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20Act,%201993.pdf)
37
- * [1994](https://web.archive.org/web/20241130115733/http://www.parliament.go.tz/polis/uploads/bills/acts/1566638051-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20(No.%202)%20Act,%201994.pdf)
38
- * [2002](https://web.archive.org/web/20250427172313/http://parliament.go.tz/polis/uploads/bills/acts/1454076376-ActNo-25-2002.pdf)
53
+ * [Act No. 57 of 1964](https://web.archive.org/web/20250426030228/http://www.parliament.go.tz/polis/uploads/bills/acts/1565172859-The%20Public%20Holidays%20Ordinance%20(amendment)%20Act,%201964.pdf)
54
+ * [Act No. 28 of 1966](https://web.archive.org/web/20241130122429/http://www.parliament.go.tz/polis/uploads/bills/acts/1565692654-The%20Public%20Holidays%20Ordinance%20(Amendment)%20Act,%201966.pdf)
55
+ * [Regular Notice No. 115 of 1973](https://web.archive.org/web/20250726035131/https://archive.gazettes.africa/archive/tz/1973/tz-government-gazette-dated-1973-02-02-no-5.pdf)
56
+ * [Act No. 1 of 1993](https://web.archive.org/web/20250425095011/https://www.parliament.go.tz/polis/uploads/bills/acts/1566639469-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20Act,%201993.pdf)
57
+ * [Act No. 10 of 1994](https://web.archive.org/web/20240515125908/https://www.parliament.go.tz/polis/uploads/bills/acts/1566638051-The%20Written%20Laws%20(Miscellaneous%20Amendments)%20(No.%202)%20Act,%201994.pdf)
58
+ * [Supplements No. 39 of 2002](https://web.archive.org/web/20250726035133/https://media.tanzlii.org/media/legislation/375064/source_file/276a8691d29bd8a3/tz-act-gn-2002-451-publication-document.pdf)
59
+ * [Act No. 25 of 2002](https://web.archive.org/web/20250427172313/http://parliament.go.tz/polis/uploads/bills/acts/1454076376-ActNo-25-2002.pdf)
60
+ * [Government Notice No. 486 of 2022](https://web.archive.org/web/20250815171402/https://media.tanzlii.org/media/legislation/325046/source_file/aaaaa31bca89a995/tz-act-gn-2022-486-publication-document.pdf)
61
+ * [The Public Holidays Act (as of 2025)](https://web.archive.org/web/20250726035253/https://www.nps.go.tz/uploads/documents/sw-1751397436-THE%20PUBLIC%20HOLIDAYS%20ACT.pdf)
39
62
  * <https://en.wikipedia.org/wiki/Public_holidays_in_Tanzania>
40
63
  * <https://web.archive.org/web/20250427125715/https://mytanzaniatimes.blogspot.com/2014/08/holiday-nane-nane-farmers-day-in.html>
41
- * <https://web.archive.org/web/20231209061602/https://www.theeastafrican.co.ke/tea/business/tanzania-declares-public-holiday-on-census-day-3918836>
42
- * <https://web.archive.org/web/20250413194112/https://www.dw.com/en/samia-suluhu-hassan-who-is-tanzanias-new-president/a-56932264>
43
64
 
44
65
  Checked With:
45
- * [2023](https://web.archive.org/web/20250403094322/https://www.bot.go.tz/webdocs/Other/2023%20public%20holidays.pdf)
66
+ * [2025](https://web.archive.org/web/20250214094413/https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202025.pdf)
67
+ * [2024](https://web.archive.org/web/20250403094322/https://www.bot.go.tz/webdocs/Other/2023%20public%20holidays.pdf)
68
+ * [2023](https://web.archive.org/web/20230811104654/https://www.bot.go.tz/webdocs/Other/2023%20public%20holidays.pdf)
46
69
  * [2022](https://web.archive.org/web/20230123001009/https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202022.pdf)
47
70
  * [2021](https://web.archive.org/web/20210812134750/https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202021.pdf)
48
- * [2020](https://web.archive.org/web/20201219014125/https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202020.pdf)
49
- * [2018](https://web.archive.org/web/20190528223244/http://issamichuzi.blogspot.com:80/2017/11/sikukuu-za-kitaifa-zenye-mapumziko-kwa.html)
50
- * [from 2013 onwards](https://web.archive.org/web/20250130093727/https://www.timeanddate.com/holidays/tanzania/)
51
-
52
- Limitations:
53
- * Only works from 1994 onwards due to the lack of sources for certain legislation:
54
- * Government Notices No. 79 of 1977
55
- * Government Notices No. 300 of 1985
56
- * Government Notices No. 296 of 1994
57
- * Exact Islamic holidays dates are only available for 2013-2023; the rest are estimates.
71
+ * [2020 (2)](https://web.archive.org/web/20201219014125/https://www.bot.go.tz/webdocs/Other/PUBLIC%20HOLIDAYS%202020.pdf)
72
+ * [2020 (1)](https://web.archive.org/web/20250717184907/https://archive.gazettes.africa/archive/tz/2019/tz-government-gazette-dated-2019-11-08-no-46.pdf)
73
+ * [2018](https://web.archive.org/web/20250726041516/https://www.michuzi.co.tz/2017/11/sikukuu-za-kitaifa-zenye-mapumziko-kwa.html)
74
+ * [2014](https://web.archive.org/web/20250726041327/https://archive.gazettes.africa/archive/tz/2013/tz-government-gazette-dated-2013-07-12-no-28.pdf)
75
+ * [2013](https://web.archive.org/web/20250717184650/https://archive.gazettes.africa/archive/tz/2012/tz-government-gazette-dated-2012-11-30-no-48.pdf)
76
+ * [2011](https://web.archive.org/web/20250726041328/https://archive.gazettes.africa/archive/tz/2010/tz-government-gazette-dated-2010-10-08-no-41.pdf)
77
+ * [2010](https://web.archive.org/web/20250726041331/https://archive.gazettes.africa/archive/tz/2009/tz-government-gazette-dated-2009-09-25-no-39.pdf)
78
+ * [2009](https://web.archive.org/web/20250726042634/https://archive.gazettes.africa/archive/tz/2008/tz-government-gazette-dated-2008-09-19-no-38.pdf)
79
+ * [2007](https://web.archive.org/web/20250726035107/https://archive.gazettes.africa/archive/tz/2006/tz-government-gazette-dated-2006-09-29-no-39.pdf)
80
+ * [2006](https://web.archive.org/web/20250726042507/https://archive.gazettes.africa/archive/tz/2005/tz-government-gazette-dated-2005-11-11-no-45.pdf)
81
+ * [2004](https://web.archive.org/web/20250726042505/https://archive.gazettes.africa/archive/tz/2003/tz-government-gazette-dated-2003-10-24-no-43.pdf)
82
+ * [2003](https://web.archive.org/web/20250726042558/https://archive.gazettes.africa/archive/tz/2002/tz-government-gazette-dated-2002-12-06-no-49.pdf)
83
+ * [2002](https://web.archive.org/web/20250726042713/https://archive.gazettes.africa/archive/tz/2001/tz-government-gazette-dated-2001-09-28-no-39.pdf)
84
+ * [2001](https://web.archive.org/web/20250726042632/https://archive.gazettes.africa/archive/tz/2000/tz-government-gazette-dated-2000-09-22-no-38.pdf)
85
+ * [1998](https://web.archive.org/web/20250726042845/https://archive.gazettes.africa/archive/tz/1997/tz-government-gazette-dated-1997-10-17-no-42.pdf)
86
+ * [1994](https://web.archive.org/web/20250726043005/https://archive.gazettes.africa/archive/tz/1993/tz-government-gazette-dated-1993-10-15-no-42.pdf)
87
+ * [1992](https://web.archive.org/web/20250726043006/https://archive.gazettes.africa/archive/tz/1991/tz-government-gazette-dated-1991-08-30-no-35.pdf)
88
+ * [1991](https://web.archive.org/web/20250726043011/https://archive.gazettes.africa/archive/tz/1990/tz-government-gazette-dated-1990-08-24-no-36.pdf)
89
+ * [1987](https://web.archive.org/web/20250726043022/https://archive.gazettes.africa/archive/tz/1986/tz-government-gazette-dated-1986-10-10-no-41.pdf)
90
+ * [1984](https://web.archive.org/web/20250726043037/https://archive.gazettes.africa/archive/tz/1983/tz-government-gazette-dated-1983-11-18-no-46.pdf)
91
+ * [1983](https://web.archive.org/web/20250726042943/https://archive.gazettes.africa/archive/tz/1982/tz-government-gazette-dated-1982-11-12-no-46.pdf)
92
+ * [1982](https://web.archive.org/web/20250726043116/https://archive.gazettes.africa/archive/tz/1981/tz-government-gazette-dated-1981-09-25-no-39.pdf)
93
+ * [1975](https://web.archive.org/web/20250726043340/https://archive.gazettes.africa/archive/tz/1974/tz-government-gazette-dated-1974-10-25-no-43.pdf)
94
+ * [1970](https://web.archive.org/web/20250717155730/https://archive.gazettes.africa/archive/tz/1969/tz-government-gazette-dated-1969-09-26-no-42.pdf)
95
+ * [1969](https://web.archive.org/web/20250726043344/https://archive.gazettes.africa/archive/tz/1968/tz-government-gazette-dated-1968-11-29-no-53.pdf)
96
+ * [1965](https://web.archive.org/web/20250717150107/https://archive.gazettes.africa/archive/tz/1964/tz-government-gazette-dated-1964-12-18-no-75.pdf)
97
+ * <https://web.archive.org/web/20250726043450/https://www.timeanddate.com/holidays/tanzania/>
58
98
  """
59
99
 
60
100
  country = "TZ"
@@ -62,9 +102,13 @@ class Tanzania(
62
102
  default_language = "sw"
63
103
  # %s (estimated).
64
104
  estimated_label = tr("%s (makisio)")
105
+ # %s (observed).
106
+ observed_label = tr("Badala ya %s")
107
+ # %s (observed, estimated).
108
+ observed_estimated_label = tr("Badala ya %s (makisio)")
65
109
  supported_languages = ("en_US", "sw")
66
- # Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
67
- start_year = 1994
110
+ # Public Holidays Ordinance (Amendment) Act, 1964.
111
+ start_year = 1965
68
112
 
69
113
  def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
70
114
  """
@@ -81,6 +125,33 @@ class Tanzania(
81
125
  StaticHolidays.__init__(self, TanzaniaStaticHolidays)
82
126
  super().__init__(*args, **kwargs)
83
127
 
128
+ def _populate_observed(self, dts: set[date], dts_special: set[date]) -> None:
129
+ """
130
+ Applies `SAT_SUN_TO_NEXT_MON_TUE` instead of `SAT_SUN_TO_NEXT_MON`
131
+ observed_rule for Christmas Day and the first day of Eid al-Fitr
132
+ holidays, based on section 4 of the Ordinance.
133
+
134
+ Added via Act No. 10 of 1994 on July 29th, 1994.
135
+ Removed via G.N. No. 486 of 2022 on July 15th, 2022.
136
+
137
+ For 1994 and 2022 edge cases, see `special_public_holidays_observed`.
138
+ """
139
+ if self._year <= 1994 or self._year >= 2022:
140
+ return
141
+
142
+ # If a holiday falls on Holy Saturday.
143
+ holy_saturday = _timedelta(self._easter_sunday, -1)
144
+
145
+ for dt in sorted(dts):
146
+ if dt in dts_special:
147
+ rule = SAT_SUN_TO_NEXT_MON_TUE
148
+ elif dt == holy_saturday:
149
+ rule = SAT_TO_NEXT_TUE
150
+ else:
151
+ rule = SAT_SUN_TO_NEXT_MON
152
+ for name in self.get_list(dt):
153
+ self._add_observed(dt, name, rule)
154
+
84
155
  def _populate_bank_holidays(self):
85
156
  # Sikukuu ya Pasaka.
86
157
  # Status: In-Use.
@@ -90,144 +161,128 @@ class Tanzania(
90
161
  self._add_easter_sunday(tr("Sikukuu ya Pasaka"))
91
162
 
92
163
  def _populate_public_holidays(self):
93
- # In-lieus ("Badala ya %s") are observed on Monday should it fall on the weekends.
94
- # Abrogated in Public Holidays Ordinance No. 28 of 1966.
95
- # Reinstituted in Written Law (Miscellaneous Amendments) (No. 2) Act, 1994.
96
- # Claimed to be abrogated again on an unspecified date.
164
+ dts_observed = set()
165
+ dts_special = set()
97
166
 
98
- # Fixed Date Holidays.
99
-
100
- # Mwaka Mpya.
101
- # Status: In-Use.
102
- # Abrogated in Public Holidays Ordinance No. 28 of 1966.
103
- # Reinstituted prior to the Written Law (Miscellaneous Amendments) (No. 1) Act, 1993.
104
-
105
- # New Year's Day.
106
- self._add_new_years_day(tr("Mwaka Mpya"))
107
-
108
- # Mapinduzi ya Zanzibar.
109
- # Status: In-Use.
110
- # Commemorates the fall of the Sultanate of Zanzibar on Jan 12, 1964.
167
+ # Removed via Act No. 28 of 1966 on August 4th, 1966.
168
+ # Readded in 1987.
169
+ if self._year <= 1966 or self._year >= 1987:
170
+ # New Year's Day.
171
+ dts_observed.add(self._add_new_years_day(tr("Mwaka Mpya")))
111
172
 
112
173
  # Zanzibar Revolution Day.
113
- self._add_holiday_jan_12(tr("Mapinduzi ya Zanzibar"))
114
-
115
- # Siku ya kumbukumbu ya Rais wa Kwanza wa Serikali ya Mapinduzi Zanzibar
116
- # Sheikh Abeid Amani Karume.
117
- # Status: In-Use.
118
- # Commemorates the death of Abeid Amani Karume on Apr 7, 1972.
119
- # Assumed to start via Government Notices 79 of 1977.
120
-
121
- self._add_holiday_apr_7(
122
- # The Sheikh Abeid Amani Karume Day.
123
- tr(
124
- "Siku ya kumbukumbu ya Rais wa Kwanza wa Serikali ya Mapinduzi Zanzibar "
125
- "Sheikh Abeid Amani Karume"
174
+ dts_observed.add(self._add_holiday_jan_12(tr("Mapinduzi ya Zanzibar")))
175
+
176
+ # Added via Regular Notice No. 115 of 1973 on January 27th, 1973.
177
+ # Name changed in 1977 with the merger of ASP and TANU into CCM.
178
+ # Removed via Act No. 1 of 1993 on February 19th, 1993.
179
+ if 1973 <= self._year <= 1993:
180
+ self._add_holiday_feb_5(
181
+ # CCM Party Founding Day.
182
+ tr("Kuzaliwa kwa Chama cha Mapinduzi")
183
+ if self._year >= 1977
184
+ # Afro-Shirazi Party Founding Day.
185
+ else tr("Kuzaliwa kwa ASP")
126
186
  )
127
- )
128
187
 
129
- # Muungano wa Tanganyika na Zanzibar.
130
- # Status: In-Use.
131
- # Commemorates the creation of the United Republic of Tanzania on Apr 26, 1964.
132
-
133
- # Union Celebrations.
134
- self._add_holiday_apr_26(tr("Muungano wa Tanganyika na Zanzibar"))
135
-
136
- # Sikukuu ya Wafanyakazi.
137
- # Status: In-Use.
138
-
139
- # Worker's Day.
140
- self._add_labor_day(tr("Sikukuu ya Wafanyakazi"))
141
-
142
- # Sabasaba.
143
- # Status: In-Use.
144
- # Celebrates the formation of Tanganyika African National Union party on Jul 7, 1954.
145
- # First started in the Public Holidays Ordinance No. 57 of 1964.
146
- # Abrogated in 1993 (need official source on this)
147
- # Reinstituted via Government Notices 296 of 1994.
148
-
149
- # International Trade Fair.
150
- self._add_holiday_jul_7(tr("Sabasaba"))
151
-
152
- # Siku ya Wakulima.
153
- # Status: In-Use.
154
- # Also known as Nane Nane.
155
- # Started via Government Notices 296 of 1994 to replace Sabasaba.
188
+ # Added in 2006.
189
+ if self._year >= 2006:
190
+ dts_observed.add(
191
+ self._add_holiday_apr_7(
192
+ # The Sheikh Abeid Amani Karume Day.
193
+ tr(
194
+ "Siku ya kumbukumbu ya Rais wa Kwanza wa Serikali ya Mapinduzi Zanzibar "
195
+ "Sheikh Abeid Amani Karume"
196
+ )
197
+ )
198
+ )
156
199
 
157
- # Peasants Day.
158
- self._add_holiday_aug_8(tr("Siku ya Wakulima"))
200
+ # Good Friday.
201
+ self._add_good_friday(tr("Ijumaa Kuu"))
159
202
 
160
- # Kumbukumbu ya Mwalimu Nyerere.
161
- # Status: In-Use.
162
- # Commemorates the death of Julius Kambarage Nyerere on Oct 14, 1999.
163
- # Adopted in Written Law (Miscellaneous Amendments) (No. 3) Act, 2002.
203
+ # Easter Monday.
204
+ self._add_easter_monday(tr("Jumatatu ya Pasaka"))
164
205
 
165
- if self._year >= 2003:
166
- # The Mwalimu Nyerere Day.
167
- self._add_holiday_oct_14(tr("Kumbukumbu ya Mwalimu Nyerere"))
206
+ dts_observed.add(
207
+ self._add_holiday_apr_26(
208
+ # Union Celebrations.
209
+ tr("Muungano wa Tanzania")
210
+ if self._year >= 1991
211
+ # Union Day.
212
+ else tr("Sikukuu ya Muungano")
213
+ )
214
+ )
168
215
 
169
- # Uhuru na Jamhuri.
170
- # Status: In-Use.
171
- # Commemorates the Independence of Tanganyika from the United Kingdom on Dec 9, 1961.
216
+ # International Workers' Day.
217
+ dts_observed.add(self._add_labor_day(tr("Sikukuu ya Wafanyakazi Ulimwenguni")))
218
+
219
+ # Renamed Peasants' Day in 1977.
220
+ # Name reverted back, with English name changed to International Trade Fair in 1994.
221
+ if self._year >= 1994:
222
+ # International Trade Fair.
223
+ name = tr("Sabasaba")
224
+ elif self._year >= 1977:
225
+ # Peasants' Day.
226
+ name = tr("Sikukuu ya Wakulima")
227
+ else:
228
+ # Saba Saba Day.
229
+ name = tr("Saba Saba")
230
+ dts_observed.add(self._add_holiday_jul_7(name))
231
+
232
+ # Made into its own holiday separate from Saba Saba Day in 1995.
233
+ if self._year >= 1995:
234
+ # Peasants' Day.
235
+ dts_observed.add(self._add_holiday_aug_8(tr("Sikukuu ya Wakulima")))
236
+
237
+ # Added via Supplements No. 39 of 2002 on October 4th, 2002.
238
+ # Reaffirmed via Act No. 25 of 2002 on November 14th, 2002.
239
+ if self._year >= 2002:
240
+ dts_observed.add(
241
+ self._add_holiday_oct_14(
242
+ # The Mwalimu Nyerere Day and Climax of the Uhuru Torch Race.
243
+ tr("Kumbukumbu ya Mwalimu Nyerere na Kilele cha mbio za Mwenge")
244
+ )
245
+ )
172
246
 
173
247
  # Independence and Republic Day.
174
- self._add_holiday_dec_9(tr("Uhuru na Jamhuri"))
175
-
176
- # Kuzaliwa Kristo.
177
- # Status: In-Use.
248
+ dts_observed.add(self._add_holiday_dec_9(tr("Uhuru na Jamhuri")))
178
249
 
179
250
  # Christmas Day.
180
- self._add_christmas_day(tr("Kuzaliwa Kristo"))
181
-
182
- # Siku ya Kupeana Zawadi.
183
- # Status: In-Use.
184
- # Abrogated in Public Holidays Ordinance No. 28 of 1966.
185
- # Reinstituted in Written Law (Miscellaneous Amendments) (No. 1) Act, 1993.
186
-
187
- # Boxing Day.
188
- self._add_christmas_day_two(tr("Siku ya Kupeana Zawadi"))
189
-
190
- # Christian Calendar Holidays.
191
-
192
- # Ijumaa Kuu.
193
- # Status: In-Use.
194
-
195
- # Good Friday.
196
- self._add_good_friday(tr("Ijumaa Kuu"))
197
-
198
- # Jumatatu ya Pasaka.
199
- # Status: In-Use.
251
+ dt = self._add_christmas_day(tr("Kuzaliwa Kristo"))
252
+ dts_observed.add(dt)
253
+ dts_special.add(dt)
200
254
 
201
- # Easter Monday.
202
- self._add_easter_monday(tr("Jumatatu ya Pasaka"))
255
+ # Removed via Act No. 28 of 1966 on August 4th, 1966
256
+ # Readded via Act No. 1 of 1993 on February 19th, 1993.
257
+ if self._year <= 1965 or self._year >= 1993:
258
+ # Boxing Day.
259
+ dts_observed.add(self._add_christmas_day_two(tr("Siku ya Kupeana Zawadi")))
203
260
 
204
- # Islamic Calendar Holidays.
261
+ # Islamic Holidays.
205
262
 
206
- # Eid El-Fitry.
207
- # Status: In-Use.
208
- # Used to be celebrated for 2 days in the 1964 and 1966 amendments.
263
+ # The 1975 official calendar lists only one Eid al-Fitr, unlike other contemporary sources
264
+ # (e.g., 1970, 1982). No legal changes have been found to explain this, so it is assumed
265
+ # to be a clerical error.
209
266
 
210
267
  # Eid al-Fitr.
211
- self._add_eid_al_fitr_day(tr("Eid El-Fitry"))
212
-
213
- # Eid El-Hajj.
214
- # Status: In-Use.
215
- # Used to be celebrated for 2 days in the 1964 amendments.
268
+ name = tr("Eid El-Fitri")
269
+ dts = self._add_eid_al_fitr_day(name)
270
+ dts_observed.update(dts)
271
+ dts_special.update(dts)
272
+ dts_observed.update(self._add_eid_al_fitr_day_two(name))
216
273
 
217
274
  # Eid al-Adha.
218
- self._add_eid_al_adha_day(tr("Eid El-Hajj"))
219
-
220
- # Maulidi.
221
- # Status: In-Use.
275
+ name = tr("Eid El Hajj")
276
+ dts_observed.update(self._add_eid_al_adha_day(name))
277
+ # Removed via Act No. 28 of 1966 on August 4th, 1966
278
+ if self._year <= 1966:
279
+ dts_observed.update(self._add_eid_al_adha_day_two(name))
222
280
 
223
281
  # Prophet's Birthday.
224
- self._add_mawlid_day(tr("Maulidi"))
282
+ dts_observed.update(self._add_mawlid_day(tr("Maulidi")))
225
283
 
226
- # Defunct Holidays.
227
-
228
- # 5th Day of February ??? (Name Unavailable)
229
- # Status: Defunct.
230
- # Abrogated in Written Law (Miscellaneous Amendments) (No. 1) Act, 1993.
284
+ if self.observed:
285
+ self._populate_observed(dts_observed, dts_special)
231
286
 
232
287
 
233
288
  class TZ(Tanzania):
@@ -239,55 +294,123 @@ class TZA(Tanzania):
239
294
 
240
295
 
241
296
  class TanzaniaIslamicHolidays(_CustomIslamicHolidays):
297
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2013, 2025)
242
298
  EID_AL_ADHA_DATES = {
243
- 2013: (OCT, 15),
299
+ # https://web.archive.org/web/20250717150107/https://archive.gazettes.africa/archive/tz/1964/tz-government-gazette-dated-1964-12-18-no-75.pdf
300
+ 1965: (APR, 13),
301
+ # https://web.archive.org/web/20250717095924/https://archive.gazettes.africa/archive/tz/1967/tz-government-gazette-dated-1967-03-17-no-12.pdf
302
+ 1967: (MAR, 22),
303
+ # https://web.archive.org/web/20250726040536/https://archive.gazettes.africa/archive/tz/1968/tz-government-gazette-dated-1968-03-01-no-9.pdf
304
+ 1968: (MAR, 10),
305
+ 1969: (FEB, 28),
306
+ # https://web.archive.org/web/20250726040512/https://archive.gazettes.africa/archive/tz/1969/tz-government-gazette-dated-1969-09-26-no-42.pdf
307
+ 1970: (FEB, 17),
308
+ 1975: (DEC, 14),
309
+ 1982: (OCT, 5),
310
+ 1983: (SEP, 25),
311
+ 1984: (SEP, 9),
312
+ 1987: (AUG, 7),
313
+ 1991: (JUN, 21),
314
+ 1992: (JUN, 12),
315
+ 1994: (MAY, 20),
316
+ 1998: (APR, 7),
317
+ 2001: (MAR, 5),
318
+ 2003: (FEB, 12),
319
+ 2004: (FEB, 2),
320
+ 2006: (JAN, 9),
321
+ 2007: (JAN, 1),
244
322
  2014: (OCT, 5),
245
- 2015: (SEP, 23),
246
323
  2016: (SEP, 16),
247
324
  2017: (SEP, 2),
248
325
  2018: (AUG, 22),
249
326
  2019: (AUG, 13),
250
- 2020: (JUL, 31),
251
327
  2021: (JUL, 21),
252
328
  2022: (JUL, 10),
253
329
  2023: (JUN, 29),
330
+ 2024: (JUN, 17),
331
+ 2025: (JUN, 7),
254
332
  }
255
333
 
334
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2013, 2025)
256
335
  EID_AL_FITR_DATES = {
257
- 2013: (AUG, 8),
336
+ # https://web.archive.org/web/20250726040204/https://archive.gazettes.africa/archive/tz/1964/tz-government-gazette-dated-1964-12-18-no-75.pdf
337
+ 1965: (FEB, 3),
338
+ # https://web.archive.org/web/20250726040214/https://archive.gazettes.africa/archive/tz/1967/tz-government-gazette-dated-1967-01-10-no-2.pdf
339
+ 1967: (JAN, 13),
340
+ # https://web.archive.org/web/20250726040216/https://archive.gazettes.africa/archive/tz/1967/tz-government-gazette-dated-1967-12-30-no-58.pdf
341
+ 1968: (JAN, 2),
342
+ 1969: (DEC, 11),
343
+ # 1970 Rough Estimate wasn't updated from last year figure.
344
+ 1975: (OCT, 7),
345
+ 1982: (JUL, 24),
346
+ 1983: (JUL, 13),
347
+ 1984: (JUL, 4),
348
+ 1987: (MAY, 29),
349
+ 1991: (APR, 15),
350
+ 1992: (APR, 5),
351
+ 1994: (MAR, 12),
352
+ 1998: (JAN, 29),
353
+ 2001: (DEC, 26),
354
+ 2003: (NOV, 27),
355
+ 2004: (OCT, 18),
356
+ 2006: (OCT, 29),
357
+ 2007: (OCT, 13),
258
358
  2014: (JUL, 29),
259
359
  2015: (JUL, 18),
260
360
  2016: (JUL, 7),
261
361
  2017: (JUN, 26),
262
- 2018: (JUN, 15),
263
362
  2019: (JUN, 5),
264
- 2020: (MAY, 24),
265
363
  2021: (MAY, 14),
266
364
  2022: (MAY, 3),
267
365
  2023: (APR, 22),
268
- 2024: (APR, 10),
366
+ 2025: (MAR, 31),
269
367
  }
270
368
 
369
+ MAWLID_DATES_CONFIRMED_YEARS = (2013, 2025)
271
370
  MAWLID_DATES = {
272
- 2013: (JAN, 24),
371
+ # https://web.archive.org/web/20250726040036/https://archive.gazettes.africa/archive/tz/1965/tz-government-gazette-dated-1965-02-12-no-7.pdf
372
+ 1965: (JUL, 12),
373
+ # https://web.archive.org/web/20250726040035/https://archive.gazettes.africa/archive/tz/1967/tz-government-gazette-dated-1967-06-16-no-26.pdf
374
+ 1967: (JUN, 21),
375
+ # https://web.archive.org/web/20250717095809/https://archive.gazettes.africa/archive/tz/1968/tz-government-gazette-dated-1968-06-07-no-23.pdf
376
+ 1968: (JUN, 10),
377
+ 1969: (MAY, 29),
378
+ # 1970 Rough Estimate wasn't updated from last year figure.
379
+ 1975: (MAR, 25),
380
+ 1982: (JAN, 8),
381
+ 1983: (DEC, 20),
382
+ 1984: (DEC, 8),
383
+ 1987: (NOV, 4),
384
+ 1991: (OCT, 19),
385
+ 1992: (SEP, 10),
386
+ 1994: (AUG, 18),
387
+ 1998: (APR, 7),
388
+ 2001: (JUL, 6),
389
+ 2003: (MAY, 12),
390
+ 2004: (MAY, 2),
391
+ 2006: (APR, 10),
392
+ 2007: (MAR, 31),
273
393
  2014: (JAN, 14),
274
394
  2015: ((JAN, 3), (DEC, 24)),
275
395
  2016: (DEC, 12),
276
396
  2017: (DEC, 1),
277
397
  2018: (NOV, 21),
278
398
  2019: (NOV, 10),
279
- 2020: (OCT, 29),
280
399
  2021: (OCT, 19),
281
400
  2022: (OCT, 9),
282
401
  2023: (SEP, 28),
402
+ 2024: (SEP, 16),
283
403
  }
284
404
 
285
405
 
286
406
  class TanzaniaStaticHolidays:
287
- # Special Holidays.
407
+ """Tanzania special holidays.
288
408
 
289
- # John Pombe Magufuli Inauguration Day.
290
- john_magufuli_inauguration = tr("Sikukuu ya Kuapishwa kwa John Pombe Magufuli")
409
+ References:
410
+ * [G.N. No. 2440 of 1967](https://web.archive.org/web/20250726035513/https://archive.gazettes.africa/archive/tz/1967/tz-government-gazette-dated-1967-11-28-no-50a.pdf)
411
+ * <https://web.archive.org/web/20231209061602/https://www.theeastafrican.co.ke/tea/business/tanzania-declares-public-holiday-on-census-day-3918836>
412
+ * <https://web.archive.org/web/20250413194112/https://www.dw.com/en/samia-suluhu-hassan-who-is-tanzanias-new-president/a-56932264>
413
+ """
291
414
 
292
415
  # Tanzania General Election Day.
293
416
  tz_election_day = tr("Sikukuu ya Uchaguzi Mkuu wa Tanzania")
@@ -296,11 +419,14 @@ class TanzaniaStaticHolidays:
296
419
  phc_census_day = tr("Siku ya Sensa ya Kitaifa ya Watu na Makazi")
297
420
 
298
421
  # John Pombe Magufuli's Funeral.
299
- john_magufuli_funeral = tr("Mazishi cha John Pombe Magufuli")
422
+ john_magufuli_funeral = tr("Mazishi ya John Pombe Magufuli")
300
423
 
301
424
  special_public_holidays = {
425
+ # Inauguration of East African Economic Community.
426
+ 1967: (DEC, 1, tr("Uzinduzi wa Jumuiya ya Kiuchumi ya Afrika Mashariki")),
302
427
  2002: (AUG, 25, phc_census_day),
303
- 2015: (NOV, 5, john_magufuli_inauguration),
428
+ # John Pombe Magufuli Inauguration Day.
429
+ 2015: (NOV, 5, tr("Sikukuu ya Kuapishwa kwa John Pombe Magufuli")),
304
430
  2020: (OCT, 28, tz_election_day),
305
431
  2021: (
306
432
  (MAR, 22, john_magufuli_funeral),
@@ -308,3 +434,15 @@ class TanzaniaStaticHolidays:
308
434
  ),
309
435
  2022: (AUG, 23, phc_census_day),
310
436
  }
437
+ special_public_holidays_observed = {
438
+ # Christmas Day.
439
+ 1994: (DEC, 27, tr("Kuzaliwa Kristo")),
440
+ 2022: (
441
+ # New Year's Day.
442
+ (JAN, 3, tr("Mwaka Mpya")),
443
+ # International Workers' Day.
444
+ (MAY, 2, tr("Sikukuu ya Wafanyakazi Ulimwenguni")),
445
+ # Eid al-Adha.
446
+ (JUL, 11, tr("Eid El Hajj")),
447
+ ),
448
+ }
@@ -193,39 +193,24 @@ class TLS(TimorLeste):
193
193
 
194
194
 
195
195
  class TimorLesteIslamicHolidays(_CustomIslamicHolidays):
196
+ EID_AL_ADHA_DATES_CONFIRMED_YEARS = (2011, 2025)
196
197
  EID_AL_ADHA_DATES = {
197
198
  2011: (NOV, 7),
198
- 2012: (OCT, 26),
199
- 2013: (OCT, 15),
200
- 2014: (OCT, 4),
201
199
  2015: (SEP, 24),
202
200
  2016: (SEP, 18),
203
- 2017: (SEP, 1),
204
- 2018: (AUG, 21),
205
- 2019: (AUG, 11),
206
- 2020: (JUL, 31),
207
201
  2021: (JUL, 19),
208
- 2022: (JUL, 9),
209
202
  2023: (JUN, 29),
210
203
  2024: (JUN, 17),
211
- 2025: (JUN, 6),
212
204
  }
213
205
 
206
+ EID_AL_FITR_DATES_CONFIRMED_YEARS = (2011, 2025)
214
207
  EID_AL_FITR_DATES = {
215
208
  2011: (AUG, 31),
216
209
  2012: (AUG, 20),
217
- 2013: (AUG, 8),
218
- 2014: (JUL, 28),
219
- 2015: (JUL, 17),
220
210
  2016: (JUL, 7),
221
211
  2017: (JUN, 26),
222
- 2018: (JUN, 15),
223
212
  2019: (JUN, 6),
224
- 2020: (MAY, 24),
225
- 2021: (MAY, 13),
226
- 2022: (MAY, 2),
227
213
  2023: (APR, 22),
228
- 2024: (APR, 10),
229
214
  2025: (MAR, 31),
230
215
  }
231
216