Skip to content

Commit

Permalink
Update United Arab Emirates holidays: add th l10n, exact 2017-2025 …
Browse files Browse the repository at this point in the history
…entries
  • Loading branch information
PPsyrius committed Feb 2, 2025
1 parent 987ca01 commit f6f7cc9
Show file tree
Hide file tree
Showing 7 changed files with 419 additions and 420 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,8 @@ All other default values are highlighted with bold:
* - United Arab Emirates
- AE
-
- **ar**, en_US
-
- **ar**, en_US, th
- GOVERNMENT, OPTIONAL
* - United Kingdom
- GB
- Subdivisions: ENG (England), NIR (Northern Ireland), SCT (Scotland), WLS (Wales)
Expand Down
104 changes: 93 additions & 11 deletions holidays/countries/united_arab_emirates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,58 @@
from gettext import gettext as tr

from holidays.calendars import _CustomIslamicHolidays
from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, FRI, SAT, SUN
from holidays.groups import InternationalHolidays, IslamicHolidays
from holidays.calendars.gregorian import (
FEB,
MAR,
APR,
MAY,
JUN,
JUL,
AUG,
SEP,
OCT,
NOV,
DEC,
FRI,
SAT,
SUN,
)
from holidays.constants import GOVERNMENT, OPTIONAL, PUBLIC
from holidays.groups import InternationalHolidays, IslamicHolidays, StaticHolidays
from holidays.holiday_base import HolidayBase


class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays):
class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays, StaticHolidays):
"""
Holidays are regulated by the Article 74 of Federal Law No. 08 for the year 1980:
https://www.ilo.org/dyn/natlex/docs/ELECTRONIC/11956/69376/F417089305/ARE11956.pdf
However the law is not applied literally, and was amended often in the past few years.
Sources:
2017: https://www.khaleejtimes.com/nation/uae-official-public-holidays-list-2017
2018: https://www.thenational.ae/uae/government/uae-public-holidays-2018-announced-by-abu-dhabi-government-1.691393
2018: https://www.khaleejtimes.com/nation/Here-are-the-holidays-remaining-in-2018-in-UAE
2019: https://www.thenational.ae/uae/government/uae-public-holidays-for-2019-and-2020-announced-by-cabinet-1.833425
2020: https://u.ae/en/information-and-services/public-holidays-and-religious-affairs/public-holidays
2021: https://www.wam.ae/en/details/1395302957696
2022: https://www.khaleejtimes.com/ramadan/eid-al-fitr-holiday-announced-in-uae-3
2023: https://www.timeoutdubai.com/news/uae-public-holidays-in-2023
https://www.khaleejtimes.com/uae/islamic-new-year-2023-uae-announces-official-holiday-for-public-sector
2024: https://www.timeoutdubai.com/news/uae-public-holidays-in-2024
2025: https://www.timeoutdubai.com/news/uae-public-holidays-2025
"""

country = "AE"
default_language = "ar"
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US")
supported_categories = (GOVERNMENT, OPTIONAL, PUBLIC)
supported_languages = ("ar", "en_US", "th")
# Founded on DEC 2, 1971.
start_year = 1972

def __init__(self, *args, **kwargs):
InternationalHolidays.__init__(self)
IslamicHolidays.__init__(self, cls=UnitedArabEmiratesIslamicHolidays)
StaticHolidays.__init__(self, UnitedArabEmiratesStaticHolidays)
super().__init__(*args, **kwargs)

def _populate_public_holidays(self):
Expand All @@ -49,7 +75,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("رأس السنة الميلادية"))

if 2015 <= self._year <= 2022:
if 2015 <= self._year <= 2023:
# Commemoration Day.
name = tr("يوم الشهيد")
if self._year >= 2019:
Expand All @@ -69,7 +95,8 @@ def _populate_public_holidays(self):
eid_al_fitr_holiday = tr("عطلة عيد الفطر")
self._add_eid_al_fitr_day_two(eid_al_fitr_holiday)
self._add_eid_al_fitr_day_three(eid_al_fitr_holiday)
if self._year >= 2019:
if 2019 <= self._year <= 2024:
# Ramadan 30 not confirmed yet for 2025 onwards.
self._add_eid_al_fitr_eve(eid_al_fitr_holiday)

# Arafat Day.
Expand Down Expand Up @@ -105,23 +132,26 @@ class ARE(UnitedArabEmirates):
class UnitedArabEmiratesIslamicHolidays(_CustomIslamicHolidays):
EID_AL_ADHA_DATES = {
2017: (SEP, 1),
2018: (AUG, 21),
2018: (AUG, 22),
2019: (AUG, 11),
2020: (JUL, 31),
2021: (JUL, 20),
2022: (JUL, 9),
2023: (JUN, 28),
2024: (JUN, 16),
2025: (JUN, 4),
}

EID_AL_FITR_DATES = {
2017: (JUN, 25),
2018: (JUN, 14),
2018: (JUN, 15),
2019: (JUN, 4),
2020: (MAY, 24),
2021: (MAY, 13),
2022: (MAY, 2),
2023: (APR, 21),
2024: (APR, 10),
2025: (MAR, 30),
}

HIJRI_NEW_YEAR_DATES = {
Expand All @@ -132,19 +162,71 @@ class UnitedArabEmiratesIslamicHolidays(_CustomIslamicHolidays):
2021: (AUG, 12),
2022: (JUL, 30),
2023: (JUL, 21),
2024: (JUL, 7),
2025: (JUN, 26),
}

ISRA_AND_MIRAJ_DATES = {
2017: (APR, 23),
2018: (APR, 13),
2018: (APR, 14),
}

MAWLID_DATES = {
2017: (NOV, 30),
2018: (NOV, 19),
2018: (NOV, 18),
2019: (NOV, 9),
2020: (OCT, 29),
2021: (OCT, 21),
2022: (OCT, 8),
2023: (SEP, 29),
2024: (SEP, 15),
2025: (SEP, 5),
}


class UnitedArabEmiratesStaticHolidays:
"""
Special Eid al-Fitr entries for Ramadan 29 from 2020 onwards.
2019: https://www.mohre.gov.ae/en/media-centre/news/30/1/2019/عطلة-رسمية-يوم-زيارة-البابا-للمشاركين-في-فعالياته-من-القطاع-الخاص.aspx?DisableResponsive=1
2020: https://gulfbusiness.com/revealed-uae-private-sector-holidays-for-eid-al-fitr-2020/
2021: https://www.timeoutdubai.com/news/466278-eid-al-fitr-holiday-2021-dubai
2022: https://gulfnews.com/uae/eid-al-fitr-2022-holidays-for-private-and-public-sectors-in-uae-explained-1.1650951429432
https://www.arabianbusiness.com/gcc/uae/uae-suspends-work-for-three-days-marks-40-days-of-mourning-over-sheikh-khalifas-death
2023: https://hrme.economictimes.indiatimes.com/news/industry/uae-cabinet-announces-national-day-holiday-for-federal-government-from-2-to-4-december/105455071
2024: https://www.timeoutdubai.com/news/eid-al-fitr-2024-expected-dates-ramadan
2025: https://www.timeoutdubai.com/news/uae-public-holidays-2025
Cross-Checked With:
https://www.timeanddate.com/holidays/united-arab-emirates/2021?hol=134217729
"""

# Eid al-Fitr Holiday.
eid_al_fitr_holiday = tr("عطلة عيد الفطر")
# Death of Sheikh Khalifa bin Zayed Al Nahyan.
shiekh_khalifa_bin_zayed_death = tr("وفاة الشيخ خليفة بن زايد آل نهيان")

special_government_holidays = {
2022: (
(MAY, 5, eid_al_fitr_holiday),
(MAY, 6, eid_al_fitr_holiday),
(MAY, 7, eid_al_fitr_holiday),
(MAY, 8, eid_al_fitr_holiday),
),
# National Day.
2023: (DEC, 4, tr("اليوم الوطني")),
}
special_optional_holidays = {
# Pope Francis's Visit Day.
2019: (FEB, 5, tr("يوم زيارة البابا فرنسيس")),
}
special_public_holidays = {
2020: (MAY, 22, eid_al_fitr_holiday),
2021: (MAY, 11, eid_al_fitr_holiday),
2022: (
(APR, 30, eid_al_fitr_holiday),
(MAY, 14, shiekh_khalifa_bin_zayed_death),
(MAY, 15, shiekh_khalifa_bin_zayed_death),
(MAY, 16, shiekh_khalifa_bin_zayed_death),
),
2024: (APR, 8, eid_al_fitr_holiday),
}
16 changes: 12 additions & 4 deletions holidays/locale/ar/LC_MESSAGES/AE.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.29\n"
"Project-Id-Version: Holidays 0.66\n"
"POT-Creation-Date: 2023-06-28 00:13+0100\n"
"PO-Revision-Date: 2023-09-12 15:54+0100\n"
"Last-Translator: Abdelkhalek Boukli Hacene <[email protected]>\n"
"PO-Revision-Date: 2025-02-02 22:36+0700\n"
"Last-Translator: PPsyrius <[email protected]>\n"
"Language-Team: Holidays Localization Team\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingua 4.15.0\n"
"X-Generator: Poedit 3.3.2\n"
"X-Generator: Poedit 3.5\n"

#. %s (estimated).
#, c-format
Expand Down Expand Up @@ -74,3 +74,11 @@ msgstr ""
#. Prophet's Birthday.
msgid "عيد المولد النبوي"
msgstr ""

#. Death of Sheikh Khalifa bin Zayed Al Nahyan.
msgid "وفاة الشيخ خليفة بن زايد آل نهيان"
msgstr ""

#. Pope Francis's Visit Day.
msgid "يوم زيارة البابا فرنسيس"
msgstr ""
17 changes: 12 additions & 5 deletions holidays/locale/en_US/LC_MESSAGES/AE.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.42\n"
"Project-Id-Version: Holidays 0.66\n"
"POT-Creation-Date: 2023-06-28 00:13+0100\n"
"PO-Revision-Date: 2024-01-25 15:04+0200\n"
"Last-Translator: ~Jhellico <[email protected]>\n"
"PO-Revision-Date: 2025-02-02 22:36+0700\n"
"Last-Translator: PPsyrius <[email protected]>\n"
"Language-Team: Holidays Localization Team\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Lingua 4.15.0\n"
"X-Generator: Poedit 3.4\n"
"X-Generator: Poedit 3.5\n"

#. %s (estimated).
#, c-format
Expand Down Expand Up @@ -75,3 +74,11 @@ msgstr "Isra' and Mi'raj"
#. Prophet's Birthday.
msgid "عيد المولد النبوي"
msgstr "Prophet's Birthday"

#. Death of Sheikh Khalifa bin Zayed Al Nahyan.
msgid "وفاة الشيخ خليفة بن زايد آل نهيان"
msgstr "Death of Sheikh Khalifa bin Zayed Al Nahyan"

#. Pope Francis's Visit Day.
msgid "يوم زيارة البابا فرنسيس"
msgstr "Pope Francis's Visit Day"
84 changes: 84 additions & 0 deletions holidays/locale/th/LC_MESSAGES/AE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# 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 AUTHORS 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)
#
# United Arab Emirates holidays th localization.
#
msgid ""
msgstr ""
"Project-Id-Version: Holidays 0.66\n"
"POT-Creation-Date: 2025-02-01 23:14+0700\n"
"PO-Revision-Date: 2025-02-02 22:36+0700\n"
"Last-Translator: PPsyrius <[email protected]>\n"
"Language-Team: Holidays Localization Team\n"
"Language: th\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingva 5.0.3\n"
"X-Generator: Poedit 3.5\n"

#. %s (estimated).
#, c-format
msgid "(تقدير) %s"
msgstr "ชดเชย%s"

#. New Year's Day.
msgid "رأس السنة الميلادية"
msgstr "วันขึ้นปีใหม่"

#. Commemoration Day.
msgid "يوم الشهيد"
msgstr "วันรำลึกผู้อุทิศตน"

#. National Day.
msgid "اليوم الوطني"
msgstr "วันชาติสหรัฐอาหรับเอมิเรตส์"

#. Eid al-Fitr.
msgid "عيد الفطر"
msgstr "วันอีฎิ้ลฟิตริ"

#. Eid al-Fitr Holiday.
msgid "عطلة عيد الفطر"
msgstr "เทศกาลอีฎิ้ลฟิตริ"

#. Arafat Day.
msgid "وقفة عرفة"
msgstr "วันอารอฟะห์"

#. Eid al-Adha.
msgid "عيد الأضحى"
msgstr "วันอีดิ้ลอัฎฮา"

#. Eid al-Adha Holiday.
msgid "عطلة عيد الأضحى"
msgstr "เทศกาลอีดิ้ลอัฎฮา"

#. Islamic New Year.
msgid "رأس السنة الهجرية"
msgstr "วันขึ้นปีใหม่อิสลาม"

#. Isra' and Mi'raj.
msgid "ليلة المعراج"
msgstr "วันเมี๊ยะราจ"

#. Prophet's Birthday.
msgid "عيد المولد النبوي"
msgstr "วันเมาลิดนบี"

#. Death of Sheikh Khalifa bin Zayed Al Nahyan.
msgid "وفاة الشيخ خليفة بن زايد آل نهيان"
msgstr "วันไว้ทุกข์แห่งชาติแด่ชีค คาลิฟา บิน ซายิด อัล นาห์ยัน"

#. Pope Francis's Visit Day.
msgid "يوم زيارة البابا فرنسيس"
msgstr "สมเด็จพระสันตะปาปาฟรานซิสเสด็จเยือนสหรัฐอาหรับเอมิเรตส์"
Loading

0 comments on commit f6f7cc9

Please sign in to comment.