|
| 1 | +# holidays |
| 2 | +# -------- |
| 3 | +# A fast, efficient Python library for generating country, province and state |
| 4 | +# specific sets of holidays on the fly. It aims to make determining whether a |
| 5 | +# specific date is a holiday as fast and flexible as possible. |
| 6 | +# |
| 7 | +# Authors: Vacanza Team and individual contributors (see AUTHORS file) |
| 8 | +# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023 |
| 9 | +# ryanss <ryanssdev@icloud.com> (c) 2014-2017 |
| 10 | +# Website: https://github.com/vacanza/python-holidays |
| 11 | +# License: MIT (see LICENSE file) |
| 12 | + |
| 13 | +from gettext import gettext as tr |
| 14 | + |
| 15 | +from holidays.constants import OPTIONAL, PUBLIC |
| 16 | +from holidays.groups import ChristianHolidays, InternationalHolidays |
| 17 | +from holidays.holiday_base import HolidayBase |
| 18 | + |
| 19 | + |
| 20 | +class Greenland(HolidayBase, ChristianHolidays, InternationalHolidays): |
| 21 | + """ |
| 22 | + Greenlandic holidays. |
| 23 | +
|
| 24 | + References: |
| 25 | + - https://en.wikipedia.org/wiki/Public_holidays_in_Greenland |
| 26 | + - https://www.norden.org/en/info-norden/public-holidays-greenland |
| 27 | + - https://www.timeanddate.com/holidays/greenland/ |
| 28 | + """ |
| 29 | + |
| 30 | + country = "GL" |
| 31 | + default_language = "kl" |
| 32 | + supported_categories = (OPTIONAL, PUBLIC) |
| 33 | + supported_languages = ("da", "en_US", "kl") |
| 34 | + |
| 35 | + def __init__(self, *args, **kwargs): |
| 36 | + ChristianHolidays.__init__(self) |
| 37 | + InternationalHolidays.__init__(self) |
| 38 | + super().__init__(*args, **kwargs) |
| 39 | + |
| 40 | + def _populate_public_holidays(self): |
| 41 | + # New Year's Day. |
| 42 | + self._add_new_years_day(tr("Ukioq nutaaq")) |
| 43 | + |
| 44 | + # Maundy Thursday. |
| 45 | + self._add_holy_thursday(tr("Sisamanngornermi illernartumi")) |
| 46 | + |
| 47 | + # Good Friday. |
| 48 | + self._add_good_friday(tr("Tallimanngorneq ajortorsiorneq")) |
| 49 | + |
| 50 | + # Easter Sunday. |
| 51 | + self._add_easter_sunday(tr("Poorskimi")) |
| 52 | + |
| 53 | + # Easter Monday. |
| 54 | + self._add_easter_monday(tr("Poorskimi ullut aappaat")) |
| 55 | + |
| 56 | + # Great Day of Prayers. |
| 57 | + self._add_holiday_26_days_past_easter(tr("Ulloq qinuffiusoq")) |
| 58 | + |
| 59 | + # Ascension Day. |
| 60 | + self._add_ascension_thursday(tr("Ulloq Kristusip qilaliarnera")) |
| 61 | + |
| 62 | + # Whit Sunday. |
| 63 | + self._add_whit_sunday(tr("Piinsip ullua")) |
| 64 | + |
| 65 | + # Whit Monday. |
| 66 | + self._add_whit_monday(tr("Piinsip ulluisa aappaanni")) |
| 67 | + |
| 68 | + # Christmas Day. |
| 69 | + self._add_christmas_day(tr("Juulli")) |
| 70 | + |
| 71 | + # Second Day of Christmas. |
| 72 | + self._add_christmas_day_two(tr("Juullip aappaa")) |
| 73 | + |
| 74 | + def _populate_optional_holidays(self): |
| 75 | + # Epiphany. |
| 76 | + self._add_epiphany_day(tr("Mitaarneq")) |
| 77 | + |
| 78 | + # International Workers' Day. |
| 79 | + self._add_labor_day(tr("Sulisartut ulluat")) |
| 80 | + |
| 81 | + # National Day. |
| 82 | + self._add_holiday_jun_21(tr("Ullortuneq")) |
| 83 | + |
| 84 | + # Christmas Eve. |
| 85 | + self._add_christmas_eve(tr("Juulliaqqami")) |
| 86 | + |
| 87 | + # New Year's Eve. |
| 88 | + self._add_new_years_eve(tr("Ukiortaami")) |
| 89 | + |
| 90 | + |
| 91 | +class GL(Greenland): |
| 92 | + pass |
| 93 | + |
| 94 | + |
| 95 | +class GRL(Greenland): |
| 96 | + pass |
0 commit comments