Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ and detailed information.

## Available Countries

We currently support 237 country codes. The standard way to refer to a country is by using its [ISO
We currently support 238 country codes. The standard way to refer to a country is by using its [ISO
3166-1 alpha-2 code](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes), the same used
for domain names, and for a subdivision its [ISO 3166-2
code](https://en.wikipedia.org/wiki/ISO_3166-2). Some countries have common or foreign names or
Expand Down Expand Up @@ -1694,6 +1694,13 @@ any) in brackets, available languages and additional holiday categories. All cou
<td></td>
</tr>
<tr>
<td>Uganda</td>
<td>UG</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Ukraine</td>
<td>UA</td>
<td></td>
Expand Down
1 change: 1 addition & 0 deletions holidays/countries/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
from holidays.countries.turkmenistan import Turkmenistan, TM, TKM
from holidays.countries.turks_and_caicos_islands import TurksAndCaicosIslands, TC, TCA
from holidays.countries.tuvalu import Tuvalu, TV, TUV
from holidays.countries.uganda import Uganda, UG, UGA
from holidays.countries.ukraine import Ukraine, UA, UKR
from holidays.countries.united_arab_emirates import UnitedArabEmirates, AE, ARE
from holidays.countries.united_kingdom import UnitedKingdom, GB, GBR, UK
Expand Down
99 changes: 99 additions & 0 deletions holidays/countries/uganda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# holidays
# --------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
# dr-prodigy <[email protected]> (c) 2017-2023
# ryanss <[email protected]> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)

from holidays.groups import ChristianHolidays, InternationalHolidays, IslamicHolidays
from holidays.holiday_base import HolidayBase


class Uganda(HolidayBase, ChristianHolidays, InternationalHolidays, IslamicHolidays):
"""Uganda holidays.
References:
* <https://en.wikipedia.org/wiki/Public_holidays_in_Uganda>
* [Public Holidays Act, Cap. 255](https://web.archive.org/web/20250621140041/https://ulii.org/akn/ug/act/1965/23/eng@2000-12-31)
* [National Events and Calendar](https://web.archive.org/web/20250618053410/https://www.vicepresident.go.ug/national-events-and-calender/)
* [National Heroes Day](https://web.archive.org/web/20230622162351/https://publicholidays.africa/uganda/national-heroes-day/)
* [NRM Liberation Day](https://web.archive.org/web/20240124064853/https://thenilewires.com/38th-nrm-a-liberation-day-celebrations-minister-outlines-nrm-achievements/)
* [Archbishop Janani Luwum Day](https://web.archive.org/web/20200805133919/https://www.newvision.co.ug/news/1417242/uganda-declared-february-archbishop-janani-luwum-public-holiday)
* [School Calendar 2024](https://web.archive.org/web/20240519021615/https://www.education.go.ug/wp-content/uploads/2023/11/SCHOOL-CALENDAR.pdf)
* [Public Holidays 2025](https://web.archive.org/web/20250710193157/https://publicholidays.co.ug/)
"""

country = "UG"
# Uganda gained independence from the United Kingdom on October 9, 1962.
start_year = 1963

def __init__(self, *args, islamic_show_estimated: bool = True, **kwargs):
"""
Args:
islamic_show_estimated:
Whether to add "estimated" label to Islamic holidays name
if holiday date is estimated.
"""
ChristianHolidays.__init__(self)
InternationalHolidays.__init__(self)
IslamicHolidays.__init__(self, show_estimated=islamic_show_estimated)
super().__init__(*args, **kwargs)

def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day("New Year's Day")

if self._year >= 1987:
# NRM Liberation Day.
self._add_holiday_jan_26("NRM Liberation Day")

if self._year >= 2016:
# Archbishop Janani Luwum Day.
self._add_holiday_feb_16("Archbishop Janani Luwum Day")

# Women's Day.
self._add_womens_day("Women's Day")

# Good Friday.
self._add_good_friday("Good Friday")

# Easter Monday.
self._add_easter_monday("Easter Monday")

# Labor Day.
self._add_labor_day("Labour Day")

# Uganda Martyrs' Day.
self._add_holiday_jun_3("Uganda Martyrs' Day")

if self._year >= 2001:
# National Heroes' Day.
self._add_holiday_jun_9("National Heroes' Day")

# Independence Day.
self._add_holiday_oct_9("Independence Day")

# Christmas Day.
self._add_christmas_day("Christmas Day")

# Boxing Day.
self._add_christmas_day_two("Boxing Day")

# Eid al-Fitr.
self._add_eid_al_fitr_day("Eid al-Fitr")

# Eid al-Adha.
self._add_eid_al_adha_day("Eid al-Adha")


class UG(Uganda):
pass


class UGA(Uganda):
pass
1 change: 1 addition & 0 deletions holidays/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@
"turkmenistan": ("Turkmenistan", "TM", "TKM"),
"turks_and_caicos_islands": ("TurksAndCaicosIslands", "TC", "TCA"),
"tuvalu": ("Tuvalu", "TV", "TUV"),
"uganda": ("Uganda", "UG", "UGA"),
"ukraine": ("Ukraine", "UA", "UKR"),
"united_arab_emirates": ("UnitedArabEmirates", "AE", "ARE"),
"united_kingdom": ("UnitedKingdom", "GB", "GBR", "UK"),
Expand Down
Loading
Loading