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

I want to contribute Kuwait information, but I don't know how. #1705

Closed
jamjam0109 opened this issue Feb 27, 2024 · 2 comments
Closed

I want to contribute Kuwait information, but I don't know how. #1705

jamjam0109 opened this issue Feb 27, 2024 · 2 comments
Assignees

Comments

@jamjam0109
Copy link
Contributor

I've written the code below and I would like to receive feedback and have it applied, but I don't know how to use Git well. I wonder if there's someone who could contribute on my behalf.

from gettext import gettext as tr

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


class Kuwait(HolidayBase, InternationalHolidays, IslamicHolidays):
    """
    References:
    - https://www.officeholidays.com/countries/kuwait
    - https://en.wikipedia.org/wiki/2024_in_Kuwait
    - https://www.timeanddate.com/holidays/kuwait/2024
    """

    country = "KW"
    default_language = "ar"
    # %s (estimated).
    estimated_label = tr("(تقدير) %s")
    supported_languages = ("ar", "en_US")

    def __init__(self, *args, **kwargs):
        InternationalHolidays.__init__(self)
        IslamicHolidays.__init__(self)
        super().__init__(*args, **kwargs)

    def _populate_public_holidays(self):
        # New Year's Day.
        self._add_new_years_day(tr("رأس السنة الميلادية"))

        # Isra and Miraj.
        self._add_isra_and_miraj_day(tr("ليلة المعراج"))
        
        # National Day.
        self._add_holiday_feb_25(tr("اليوم الوطني"))

        # Liberation Day.
        self._add_holiday_feb_26(tr("يوم التحرير"))
       
        # 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("عطلة عيد الفطر"))
     
        # 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("عطلة عيد الأضحى"))

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

        # Prophet's Birthday.
        self._add_mawlid_day(tr("عيد المولد النبوي"))

class KW(Kuwait):
    pass


class KWT(Kuwait):
    pass
@arkid15r
Copy link
Collaborator

@jamjam0109, thanks for doing what you can, that's a great effort! The code looks fine (didn't run it yet). It still needs some tests and l10n work. I'll look into adding those and specifying you as a co-author later this week.

@arkid15r arkid15r self-assigned this Feb 27, 2024
@arkid15r arkid15r mentioned this issue Feb 29, 2024
10 tasks
@arkid15r
Copy link
Collaborator

arkid15r commented Mar 9, 2024

Closing this out as #1707 has been merged.

@arkid15r arkid15r closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants