Пример #1
0
    def holiday_may_day(self):
        """
        05-01: [NF] Πρωτομαγιά
        Postponed if it collides with Easter
        """
        date = SmartDayArrow(self.year, 5, 1)
        easter_date = easter(self.year, self.easter_type)

        if date == easter_date:
            date = date.shift(days=2)
        elif date == easter_date.shift(days=1):
            date = date.shift(days=1)

        return [Holiday(self.locale, "", date, "Πρωτομαγιά", "NF")]
Пример #2
0
    def holiday_koninkrijksdag(self):
        date = SmartDayArrow(self.year, 12, 15)

        if date.weekday() == 'sunday':
            date = date.shift(days=1)

        return [Holiday(
            locale=self.locale,
            region="",
            date=date,
            description="Koninkrijksdag",
            flags="NV",
            notes="")]
Пример #3
0
    def holiday_koningsdag(self):
        """04-27 or saturday before if it falls on sunday: [NF] Koninginnedag/Koningsdag """
        if self.year < 2014:
            date = SmartDayArrow(self.year, 4, 30)
            description = "Koninginnedag"
        else:
            date = SmartDayArrow(self.year, 4, 27)
            description = "Koningsdag"

        if date.weekday() == 'sunday':
            date = date.shift(days=-1)

        return [Holiday(
            locale=self.locale,
            region="",
            date=date,
            description=description,
            flags="NV",
            notes="")]