How to use the workalendar.core.FRI function in workalendar

To help you get started, we’ve selected a few workalendar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peopledoc / workalendar / workalendar / usa.py View on Github external
def get_variable_days(self, year):
        days = super(Florida, self).get_variable_days(year)
        days = self.float(days)
        days.append(
            (Florida.get_nth_weekday_in_month(year, 11, FRI, 4),
             "Friday after Thanksgiving")
        )
        return days
github peopledoc / workalendar / workalendar / usa / hawaii.py View on Github external
def get_statehood_day(self, year):
        """
        Statehood Day: 3rd Friday in August.
        """
        return (
            self.get_nth_weekday_in_month(year, 8, FRI, 3),
            "Statehood Day"
        )
github peopledoc / workalendar / workalendar / europe.py View on Github external
def get_midsummer_eve(self, year):
        date_eve = Finland.get_nth_weekday_in_month(
            year, 6, FRI, start=date(year, 6, 19))
        return date_eve
github peopledoc / workalendar / workalendar / europe / scotland / mixins / fair_holiday.py View on Github external
def get_fair_holiday(self, year):
        return (
            self.get_nth_weekday_in_month(year, 7, FRI, 4),
            self.fair_holiday_label
        )
github peopledoc / workalendar / workalendar / africa / south_africa.py View on Github external
def get_variable_days(self, year):
        days = super().get_variable_days(year)

        days.append(self.get_easter_monday_or_family_day(year))

        # Workers day was first friday of may 1987-1989
        if 1987 <= year <= 1989:
            days.append(
                (self.get_nth_weekday_in_month(year, 5, FRI), "Workers' Day")
            )

        if year <= 1993:
            days.append((self.get_ascension_thursday(year), "Ascension Day"))

        # Queen's Birthday on the 2nd Monday of july 1952-1960
        if 1952 <= year <= 1960:
            days.append((
                self.get_nth_weekday_in_month(year, 7, MON, 2),
                "Queen's Birthday"
            ))

        # King's Birthday on the first Monday of August 1910-1951
        if 1910 <= year <= 1951:
            days.append((
                self.get_nth_weekday_in_month(year, 8, MON),
github peopledoc / workalendar / workalendar / america / argentina.py View on Github external
def get_soberania_day(self, year):
        """
        Día de la Soberanía Nacional

        Happens on the 3rd MON of November after the first Friday.
        """
        first_friday_november = Argentina.get_nth_weekday_in_month(
            year, 11, FRI, 1
        )

        soberania_day = Argentina.get_nth_weekday_in_month(
            year, 11, MON, n=3, start=first_friday_november
        )

        return (soberania_day, "Día de la Soberanía Nacional")
github peopledoc / workalendar / workalendar / europe.py View on Github external
def get_midsummer_eve(self, year):
        date_eve = Sweden.get_nth_weekday_in_month(
            year, 6, FRI, start=date(year, 6, 19))
        return date_eve
github peopledoc / workalendar / workalendar / oceania / marshall_islands.py View on Github external
def get_variable_days(self, year):
        days = super().get_variable_days(year)
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 7, FRI),
            "Fishermen's Holiday"
        ))
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 9, FRI),
            "Labour Day"
        ))
        days.append((
            MarshallIslands.get_last_weekday_in_month(year, 9, FRI),
            "Manit Day"
        ))
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 12, FRI),
            "Gospel Day"
        ))
        return days
github peopledoc / workalendar / workalendar / usa / nebraska.py View on Github external
def get_variable_days(self, year):
        days = super().get_variable_days(year)
        days.append(
            (self.get_last_weekday_in_month(year, 4, FRI), "Arbor Day")
        )
        return days
github peopledoc / workalendar / workalendar / oceania / marshall_islands.py View on Github external
def get_variable_days(self, year):
        days = super().get_variable_days(year)
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 7, FRI),
            "Fishermen's Holiday"
        ))
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 9, FRI),
            "Labour Day"
        ))
        days.append((
            MarshallIslands.get_last_weekday_in_month(year, 9, FRI),
            "Manit Day"
        ))
        days.append((
            MarshallIslands.get_nth_weekday_in_month(year, 12, FRI),
            "Gospel Day"
        ))
        return days