- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 560
Add Uganda holidays #2833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Add Uganda holidays #2833
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            14 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      094e668
              
                Add Uganda holidays.
              
              
                Prateekshit73 9e1a5db
              
                Merge branch 'dev' into add-uganda
              
              
                Prateekshit73 dcd5828
              
                Merge branch 'dev' into add-uganda
              
              
                Prateekshit73 6d76837
              
                Apply code review suggestions.
              
              
                Prateekshit73 efbd631
              
                Fix: Add year guards for NRM Liberation Day and Archbishop Janani Luw…
              
              
                prateekshit-v f98fa7c
              
                Merge pull request #43 from prateekshit-v/add-uganda
              
              
                Prateekshit73 56f25ea
              
                Improved code comments to enhance clarity, added a No Holiday test.
              
              
                prateekshit-v 3bc473f
              
                Merge pull request #44 from prateekshit-v/add-uganda
              
              
                Prateekshit73 0f8cecc
              
                Merge branch 'vacanza:dev' into add-uganda
              
              
                Prateekshit73 ac6288c
              
                Merge branch 'dev' into add-uganda
              
              
                Prateekshit73 fe53172
              
                Update README.md
              
              
                Prateekshit73 39c9091
              
                Refactor holiday tests and update documentation sources.
              
              
                prateekshit-v 86d99fe
              
                Merge pull request #49 from prateekshit-v/add-uganda
              
              
                Prateekshit73 c908216
              
                Update code
              
              
                arkid15r File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | 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/) | ||
| """ | ||
|         
                  KJhellico marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
| 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") | ||
|         
                  KJhellico marked this conversation as resolved.
              Show resolved
            Hide resolved         
                  PPsyrius marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
| # 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") | ||
|  | ||
|         
                  arkid15r marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| # 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") | ||
|  | ||
|         
                  PPsyrius marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| # 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") | ||
|         
                  arkid15r marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
|  | ||
|  | ||
| class UG(Uganda): | ||
| pass | ||
|  | ||
|  | ||
| class UGA(Uganda): | ||
| pass | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.