Skip to content
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

Update United Arab Emirates holidays #1667

Merged
merged 3 commits into from
Jan 29, 2024
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
64 changes: 36 additions & 28 deletions holidays/countries/united_arab_emirates.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,26 @@
from gettext import gettext as tr

from holidays.calendars import _CustomIslamicHolidays
from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, NOV, FRI, SAT
from holidays.calendars.gregorian import APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, FRI, SAT
from holidays.groups import InternationalHolidays, IslamicHolidays
from holidays.holiday_base import HolidayBase


class UnitedArabEmirates(HolidayBase, InternationalHolidays, IslamicHolidays):
"""
Holidays are regulated by the Article 74
of Federal Law No. 08 for the year 1980:
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.
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 # noqa: E501
2019: https://www.thenational.ae/uae/government/uae-public-holidays-for-2019-and-2020-announced-by-cabinet-1.833425 # noqa: E501
2020: https://u.ae/en/information-and-services/public-holidays-and-religious-affairs/public-holidays # noqa: E501

Holidays based on the Islamic Calendar are estimated (and so denoted),
as are announced each year and based on moon sightings:
- Eid al-Fitr
- Eid al-Adha
- Arafat (Hajj) Day
- Al-Hijra (Islamic New Year
- Mawlud al-Nabi (Prophet Mohammad's Birthday)
- Leilat al-Miraj (Ascension of the Prophet), suspended after 2018.
"""

country = "AE"
default_language = "ar"
# Estimated label.
# %s (estimated).
estimated_label = tr("(تقدير) %s")
supported_languages = ("ar", "en_US")
weekend = {FRI, SAT}
Expand All @@ -56,7 +45,7 @@ def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("رأس السنة الميلادية"))

if self._year >= 2015:
if 2015 <= self._year <= 2022:
# Commemoration Day.
name = tr("يوم الشهيد")
if self._year >= 2019:
Expand All @@ -65,34 +54,40 @@ def _populate_public_holidays(self):
self._add_holiday_nov_30(name)

# National Day.
self._add_holiday_dec_2(tr("اليوم الوطني"))
self._add_holiday_dec_3(tr("اليوم الوطني"))
national_day = tr("اليوم الوطني")
self._add_holiday_dec_2(national_day)
self._add_holiday_dec_3(national_day)

# Eid al-Fitr.
self._add_eid_al_fitr_day(tr("عيد الفطر"))

# Eid al-Fitr Holiday.
self._add_eid_al_fitr_day_two(tr("عطلة عيد الفطر"))
self._add_eid_al_fitr_day_three(tr("عطلة عيد الفطر"))
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:
self._add_eid_al_fitr_eve(eid_al_fitr_holiday)

# Arafat Day.
self._add_arafah_day(tr("وقفة عرفة"))

# Eid al-Adha.
self._add_eid_al_adha_day(tr("عيد الأضحى"))

# Eid al-Adha Holiday.
self._add_eid_al_adha_day_two(tr("عطلة عيد الأضحى"))
self._add_eid_al_adha_day_three(tr("عطلة عيد الأضحى"))
eid_al_adha_holiday = tr("عطلة عيد الأضحى")
self._add_eid_al_adha_day_two(eid_al_adha_holiday)
self._add_eid_al_adha_day_three(eid_al_adha_holiday)

# Islamic New Year.
self._add_islamic_new_year_day(tr("رأس السنة الهجرية"))

# Leilat al-Miraj.
if self._year <= 2018: # The UAE government removed this starting 2019.
if self._year <= 2018:
# Isra' and Mi'raj.
self._add_isra_and_miraj_day(tr("ليلة المعراج"))

# Prophet Muhammad's Birthday.
if self._year <= 2019: # The UAE government removed this starting 2020.
self._add_mawlid_day(tr("عيد المولد النبوي"))
# Prophet's Birthday.
self._add_mawlid_day(tr("عيد المولد النبوي"))


class AE(UnitedArabEmirates):
Expand All @@ -109,20 +104,29 @@ class UnitedArabEmiratesIslamicHolidays(_CustomIslamicHolidays):
2018: (AUG, 21),
2019: (AUG, 11),
2020: (JUL, 31),
2021: (JUL, 20),
2022: (JUL, 9),
2023: (JUN, 28),
}

EID_AL_FITR_DATES = {
2017: (JUN, 25),
2018: (JUN, 14),
2019: (JUN, 3),
2019: (JUN, 4),
2020: (MAY, 24),
2021: (MAY, 13),
2022: (MAY, 2),
2023: (APR, 21),
}

HIJRI_NEW_YEAR_DATES = {
2017: (SEP, 22),
2018: (SEP, 11),
2019: (AUG, 31),
2020: (AUG, 23),
2021: (AUG, 12),
2022: (JUL, 30),
2023: (JUL, 21),
}

ISRA_AND_MIRAJ_DATES = {
Expand All @@ -134,4 +138,8 @@ class UnitedArabEmiratesIslamicHolidays(_CustomIslamicHolidays):
2017: (NOV, 30),
2018: (NOV, 19),
2019: (NOV, 9),
2020: (OCT, 29),
2021: (OCT, 21),
2022: (OCT, 8),
2023: (SEP, 29),
}
4 changes: 2 additions & 2 deletions holidays/locale/ar/LC_MESSAGES/AE.po
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ msgstr ""
msgid "رأس السنة الهجرية"
msgstr ""

#. Leilat al-Miraj. The UAE government removed this starting 2019.
#. Isra' and Mi'raj.
msgid "ليلة المعراج"
msgstr ""

#. Prophet Muhammad's Birthday. The UAE government removed this starting 2020.
#. Prophet's Birthday.
msgid "عيد المولد النبوي"
msgstr ""
14 changes: 7 additions & 7 deletions holidays/locale/en_US/LC_MESSAGES/AE.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Python Holidays 0.29\n"
"Project-Id-Version: Python Holidays 0.42\n"
"POT-Creation-Date: 2023-06-28 00:13+0100\n"
"PO-Revision-Date: 2023-09-12 15:59+0100\n"
"Last-Translator: Abdelkhalek Boukli Hacene <bouklihabd31@gmail.com>\n"
"PO-Revision-Date: 2024-01-25 15:04+0200\n"
"Last-Translator: ~Jhellico <jhellico@gmail.com>\n"
"Language-Team: Python 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.3.2\n"
"X-Generator: Poedit 3.4\n"

#. Estimated label.
#, c-format
Expand Down Expand Up @@ -57,10 +57,10 @@ msgstr "Eid al-Adha Holiday"
msgid "رأس السنة الهجرية"
msgstr "Islamic New Year"

#. Leilat al-Miraj. The UAE government removed this starting 2019.
#. Isra' and Mi'raj.
msgid "ليلة المعراج"
msgstr "Leilat al-Miraj (Ascension of the Prophet)"
msgstr "Isra' and Mi'raj"

#. Prophet Muhammad's Birthday. The UAE government removed this starting 2020.
#. Prophet's Birthday.
msgid "عيد المولد النبوي"
msgstr "Prophet's Birthday"
Loading
Loading