def get_variable_days(self, year): # usual variable days equinoxes = self.calculate_equinoxes(year, 'Asia/Tokyo') days = super(JapanCalendar, self).get_variable_days(year) days += [ (WesternCalendar.get_nth_weekday_in_month(year, 1, MON, 2), 'Coming of Age Day'), (WesternCalendar.get_nth_weekday_in_month(year, 7, MON, 3), "Marine Day"), (equinoxes[0], "Vernal Equinox Day"), (WesternCalendar.get_nth_weekday_in_month(year, 9, MON, 3), "Respect-for-the-Aged Day"), (equinoxes[1], "Autumnal Equinox Day"), (WesternCalendar.get_nth_weekday_in_month(year, 10, MON, 2), "Health and Sports Day"), ] return days
def get_first_day_of_summer(self, year): """It's the first thursday *after* April, 18th. If April the 18th is a thursday, then it jumps to the 24th. """ return WesternCalendar.get_nth_weekday_in_month( year, 4, THU, start=date(year, 4, 19))
def get_variable_days(self, year): days = super(IcelandCalendar, self).get_variable_days(year) days += [ ( self.get_first_day_of_summer(year), "First day of summer"), ( WesternCalendar.get_nth_weekday_in_month(year, 8, MON), "Commerce Day"), ] return days
def get_variable_days(self, year): # usual variable days days = super(UnitedStatesCalendar, self).get_variable_days(year) days += [ (WesternCalendar.get_nth_weekday_in_month(year, 1, MON, 3), 'Martin Luther King, Jr. Day'), (WesternCalendar.get_nth_weekday_in_month(year, 2, MON, 3), "Washington's Birthday"), (WesternCalendar.get_last_weekday_in_month(year, 5, MON), "Memorial Day"), (WesternCalendar.get_nth_weekday_in_month(year, 9, MON), "Labor Day"), (WesternCalendar.get_nth_weekday_in_month(year, 10, MON, 2), "Colombus Day"), (WesternCalendar.get_nth_weekday_in_month(year, 11, THU, 4), "Thanksgiving Day"), ] # Inauguration day if UnitedStatesCalendar.is_presidential_year(year - 1): inauguration_day = date(year, 1, 20) if inauguration_day.weekday() == SUN: inauguration_day = date(year, 1, 21) days.append((inauguration_day, "Inauguration Day")) return days