Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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"
)
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
def get_fair_holiday(self, year):
return (
self.get_nth_weekday_in_month(year, 7, FRI, 4),
self.fair_holiday_label
)
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),
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")
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
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
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
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