How to use the workalendar.europe.scotland.__init__.Scotland 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 / europe / scotland / __init__.py View on Github external
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
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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"
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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.
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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,
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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,
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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,
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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"
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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,
github peopledoc / workalendar / workalendar / europe / scotland / __init__.py View on Github external
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"