1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
# 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 <dr.prodigy.github@gmail.com> (c) 2017-2023
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
# Website: https://github.com/vacanza/holidays
# License: MIT (see LICENSE file)
from gettext import gettext as tr
from holidays.constants import BANK, PUBLIC
from holidays.groups import ChristianHolidays, InternationalHolidays
from holidays.holiday_base import HolidayBase
class Liechtenstein(HolidayBase, ChristianHolidays, InternationalHolidays):
"""Liechtenstein holidays.
References:
* <https://en.wikipedia.org/wiki/Public_holidays_in_Liechtenstein>
* <https://web.archive.org/web/20250122013118/https://llb.li/en/contact/bank-holidays>
"""
country = "LI"
default_language = "de"
supported_categories = (BANK, PUBLIC)
supported_languages = ("de", "en_US", "uk")
def __init__(self, *args, **kwargs) -> None:
ChristianHolidays.__init__(self)
InternationalHolidays.__init__(self)
super().__init__(*args, **kwargs)
def _populate_public_holidays(self):
# New Year's Day.
self._add_new_years_day(tr("Neujahr"))
# Epiphany.
self._add_epiphany_day(tr("Heilige Drei Könige"))
# Candlemas.
self._add_candlemas(tr("Mariä Lichtmess"))
# Saint Joseph's Day.
self._add_saint_josephs_day(tr("Josefstag"))
# Easter Sunday.
self._add_easter_sunday(tr("Ostersonntag"))
# Easter Monday.
self._add_easter_monday(tr("Ostermontag"))
# Labor Day.
self._add_labor_day(tr("Tag der Arbeit"))
# Ascension Day.
self._add_ascension_thursday(tr("Auffahrt"))
# Whit Sunday.
self._add_whit_sunday(tr("Pfingstsonntag"))
# Whit Monday.
self._add_whit_monday(tr("Pfingstmontag"))
# Corpus Christi.
self._add_corpus_christi_day(tr("Fronleichnam"))
# National Day.
self._add_assumption_of_mary_day(tr("Staatsfeiertag"))
# Nativity of Mary.
self._add_nativity_of_mary_day(tr("Mariä Geburt"))
# All Saints' Day.
self._add_all_saints_day(tr("Allerheiligen"))
# Immaculate Conception.
self._add_immaculate_conception_day(tr("Mariä Empfängnis"))
# Christmas Day.
self._add_christmas_day(tr("Weihnachten"))
# Saint Stephen's Day.
self._add_christmas_day_two(tr("Stephanstag"))
def _populate_bank_holidays(self):
# Saint Berchtold's Day.
self._add_new_years_day_two(tr("Berchtoldstag"))
# Shrove Tuesday.
self._add_carnival_tuesday(tr("Fasnachtsdienstag"))
# Good Friday.
self._add_good_friday(tr("Karfreitag"))
# Christmas Eve.
self._add_christmas_eve(tr("Heiligabend"))
# New Year's Eve.
self._add_new_years_eve(tr("Silvester"))
class LI(Liechtenstein):
pass
class LIE(Liechtenstein):
pass
|