Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
include_good_friday = True
include_easter_monday = True
class Stirling(
SpringHolidayTuesdayAfterFirstMondayMay,
BattleStirlingBridge,
Scotland):
"Stirling"
include_good_friday = True
include_easter_monday = True
class WestDunbartonshire(
AutumnHolidayLastMondaySeptember,
Scotland):
"West Dunbartonshire"
include_good_friday = True
include_easter_monday = True
if self.include_victoria_day:
# This method is included in the victoria_day mixins
days.append(self.get_victoria_day(year))
return days
def get_fixed_holidays(self, year):
days = super().get_fixed_holidays(year)
if self.include_saint_andrew:
days.append((date(year, 11, 30), "Saint Andrew's Day"))
return days
class Aberdeen(
FairHolidaySecondMondayJuly,
AutumnHolidayLastMondaySeptember,
Scotland):
"Aberdeen"
include_good_friday = True
class Angus(
SpringHolidaySecondMondayApril,
AutumnHolidayLastMondaySeptember,
Scotland):
"Angus"
include_saint_andrew = True
class Arbroath(FairHolidayThirdMondayJuly, Scotland):
"Arbroath"
class Dundee(
SpringHolidayFirstMondayApril,
VictoriaDayLastMondayMay,
FairHolidayLastMondayJuly,
AutumnHolidayFirstMondayOctober,
Scotland):
"Dundee"
class EastDunbartonshire(
SpringHolidayLastMondayMay,
FairHolidayThirdMondayJuly,
AutumnHolidayLastMondaySeptember,
Scotland):
"East Dunbartonshire"
include_good_friday = True
include_easter_monday = True
class Edinburgh(Scotland):
"Edinburgh"
include_good_friday = True
include_easter_monday = True
include_spring_holiday = True
include_victoria_day = True
include_autumn_holiday = True
def get_spring_holiday(self, year):
"""
Return Spring Holiday for Edinburgh.
class Perth(
SpringHolidayFirstMondayApril,
VictoriaDayFourthMondayMay,
BattleStirlingBridge,
AutumnHolidayFirstMondayOctober,
Scotland):
"Perth"
class ScottishBorders(
SpringHolidayFirstMondayApril,
FairHolidayFourthFridayJuly,
AutumnHolidaySecondMondayOctober,
Scotland):
"Scottish Borders"
include_saint_andrew = True
class SouthLanarkshire(
SpringHolidayLastMondayMay,
FairHolidayThirdMondayJuly,
AutumnHolidayLastMondaySeptember,
Scotland):
"South Lanarkshire"
include_good_friday = True
include_easter_monday = True
class Stirling(
SpringHolidayTuesdayAfterFirstMondayMay,
days.append((date(year, 11, 30), "Saint Andrew's Day"))
return days
class Aberdeen(
FairHolidaySecondMondayJuly,
AutumnHolidayLastMondaySeptember,
Scotland):
"Aberdeen"
include_good_friday = True
class Angus(
SpringHolidaySecondMondayApril,
AutumnHolidayLastMondaySeptember,
Scotland):
"Angus"
include_saint_andrew = True
class Arbroath(FairHolidayThirdMondayJuly, Scotland):
"Arbroath"
class Ayr(SpringHolidayLastMondayMay, AyrGoldCup, Scotland):
"Ayr"
include_good_friday = True
include_easter_monday = True
class CarnoustieMonifieth(
SpringHolidayFirstMondayApril,
class Paisley(
VictoriaDayLastMondayMay,
FairHolidayFirstMondayAugust,
AutumnHolidayLastMondaySeptember,
Scotland):
"Paisley"
include_good_friday = True
include_easter_monday = True
class Perth(
SpringHolidayFirstMondayApril,
VictoriaDayFourthMondayMay,
BattleStirlingBridge,
AutumnHolidayFirstMondayOctober,
Scotland):
"Perth"
class ScottishBorders(
SpringHolidayFirstMondayApril,
FairHolidayFourthFridayJuly,
AutumnHolidaySecondMondayOctober,
Scotland):
"Scottish Borders"
include_saint_andrew = True
class SouthLanarkshire(
SpringHolidayLastMondayMay,
FairHolidayThirdMondayJuly,
AutumnHolidayLastMondaySeptember,
Set to the third Monday in September. Since it's the only region to
follow this rule, we won't have a Mixin associated to it.
"""
return (
self.get_nth_weekday_in_month(year, 9, MON, 3),
"Autumn Holiday"
)
class Elgin(
SpringHolidaySecondMondayApril,
FairHolidayLastMondayJune,
LateSummer,
AutumnHolidayThirdMondayOctober,
Scotland):
"Elgin"
class Falkirk(FairHolidayFirstMondayJuly, BattleStirlingBridge, Scotland):
"Falkirk"
include_good_friday = True
include_easter_monday = True
class Fife(
VictoriaDayFirstMondayJune,
FairHolidayThirdMondayJuly,
AutumnHolidayThirdMondayOctober,
Scotland):
"Fife"
include_saint_andrew = True
class Ayr(SpringHolidayLastMondayMay, AyrGoldCup, Scotland):
"Ayr"
include_good_friday = True
include_easter_monday = True
class CarnoustieMonifieth(
SpringHolidayFirstMondayApril,
AutumnHolidayFirstMondayOctober,
Scotland):
"Carnoustie & Monifieth"
class Clydebank(
SpringHolidayTuesdayAfterFirstMondayMay,
Scotland):
"Clydebank"
class DumfriesGalloway(Scotland):
"Dumfries & Galloway"
include_good_friday = True
class Dundee(
SpringHolidayFirstMondayApril,
VictoriaDayLastMondayMay,
FairHolidayLastMondayJuly,
AutumnHolidayFirstMondayOctober,
Scotland):
"Dundee"
class CarnoustieMonifieth(
SpringHolidayFirstMondayApril,
AutumnHolidayFirstMondayOctober,
Scotland):
"Carnoustie & Monifieth"
class Clydebank(
SpringHolidayTuesdayAfterFirstMondayMay,
Scotland):
"Clydebank"
class DumfriesGalloway(Scotland):
"Dumfries & Galloway"
include_good_friday = True
class Dundee(
SpringHolidayFirstMondayApril,
VictoriaDayLastMondayMay,
FairHolidayLastMondayJuly,
AutumnHolidayFirstMondayOctober,
Scotland):
"Dundee"
class EastDunbartonshire(
SpringHolidayLastMondayMay,
FairHolidayThirdMondayJuly,
include_good_friday = True
class Angus(
SpringHolidaySecondMondayApril,
AutumnHolidayLastMondaySeptember,
Scotland):
"Angus"
include_saint_andrew = True
class Arbroath(FairHolidayThirdMondayJuly, Scotland):
"Arbroath"
class Ayr(SpringHolidayLastMondayMay, AyrGoldCup, Scotland):
"Ayr"
include_good_friday = True
include_easter_monday = True
class CarnoustieMonifieth(
SpringHolidayFirstMondayApril,
AutumnHolidayFirstMondayOctober,
Scotland):
"Carnoustie & Monifieth"
class Clydebank(
SpringHolidayTuesdayAfterFirstMondayMay,
Scotland):
"Clydebank"