Beispiel #1
0
    def holiday_after_new_years_day(self):
        date = SmartDayArrow(self.year, 1, 2)

        if date.weekday() in ['sunday', 'monday']:
            return [
                Holiday(locale=self.locale,
                        region="",
                        date=date.shift_to_weekday('tuesday', including=True),
                        description="Day after New Year's Day",
                        flags="NV",
                        notes="")
            ]

        elif date.weekday() == 'saturday':
            return [
                Holiday(locale=self.locale,
                        region="",
                        date=date.shift_to_weekday('monday', including=True),
                        description="Day after New Year's Day",
                        flags="NV",
                        notes="")
            ]

        return [
            Holiday(locale=self.locale,
                    region="",
                    date=date,
                    description="Day after New Year's Day",
                    flags="NV",
                    notes="")
        ]
Beispiel #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="")]
Beispiel #3
0
    def holiday_boxing_day_observed(self):
        date = SmartDayArrow(self.year, 12, 26)

        if date.weekday() == 'sunday':
            return [Holiday(
                    locale=self.locale,
                    region="",
                    date=date.shift_to_weekday('tuesday', including=True),
                    description="Boxing Day (observed)",
                    flags="NV",
                    notes="")]

        elif date.weekday() == 'saturday':
            return [Holiday(
                    locale=self.locale,
                    region="",
                    date=date.shift_to_weekday('monday', including=True),
                    description="Boxing Day (observed)",
                    flags="NV",
                    notes="")]

        return []
Beispiel #4
0
    def holiday_new_years_day_observed(self):
        date = SmartDayArrow(self.year, 1, 1)

        if date.weekday() in ['saturday', 'sunday']:
            return [Holiday(
                    locale=self.locale,
                    region="",
                    date=date.shift_to_weekday('monday', including=True),
                    description="New Year's Day (observed)",
                    flags="NV",
                    notes="")]

        return []
Beispiel #5
0
    def holiday_anzac_day_observed(self):
        date = SmartDayArrow(self.year, 4, 25)

        if self.year > 2015 and date.weekday() in ['saturday', 'sunday']:
            return [
                Holiday(locale=self.locale,
                        region="",
                        date=date.shift_to_weekday('monday', including=True),
                        description="ANZAC Day (observed)",
                        flags="NV",
                        notes="")
            ]

        return []
Beispiel #6
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="")]