mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 09:29:22 -04:00
Merge pull request #1791 from alphagov/bank-hols
add 2018 and 2019 bank holidays
This commit is contained in:
@@ -179,25 +179,40 @@ def is_weekend(time):
|
||||
|
||||
|
||||
def is_bank_holiday(time):
|
||||
return time.strftime('%d/%m/%Y') in {
|
||||
# taken from
|
||||
# https://github.com/alphagov/calendars/blob/7f6512b0a95d77aa22accef105860074c19f1ec0/lib/data/bank-holidays.json
|
||||
"01/01/2016",
|
||||
"25/03/2016",
|
||||
"28/03/2016",
|
||||
"02/05/2016",
|
||||
"30/05/2016",
|
||||
"29/08/2016",
|
||||
"26/12/2016",
|
||||
"27/12/2016",
|
||||
"02/01/2017",
|
||||
"14/04/2017",
|
||||
"17/04/2017",
|
||||
"01/05/2017",
|
||||
"29/05/2017",
|
||||
"28/08/2017",
|
||||
"25/12/2017",
|
||||
"26/12/2017",
|
||||
return time.strftime('%Y-%m-%d') in {
|
||||
# taken from https://www.gov.uk/bank-holidays.json
|
||||
"2016-01-01",
|
||||
"2016-03-25",
|
||||
"2016-03-28",
|
||||
"2016-05-02",
|
||||
"2016-05-30",
|
||||
"2016-08-29",
|
||||
"2016-12-26",
|
||||
"2016-12-27",
|
||||
"2017-01-02",
|
||||
"2017-04-14",
|
||||
"2017-04-17",
|
||||
"2017-05-01",
|
||||
"2017-05-29",
|
||||
"2017-08-28",
|
||||
"2017-12-25",
|
||||
"2017-12-26",
|
||||
"2018-01-01",
|
||||
"2018-03-30",
|
||||
"2018-04-02",
|
||||
"2018-05-07",
|
||||
"2018-05-28",
|
||||
"2018-08-27",
|
||||
"2018-12-25",
|
||||
"2018-12-26",
|
||||
"2019-01-01",
|
||||
"2019-04-19",
|
||||
"2019-04-22",
|
||||
"2019-05-06",
|
||||
"2019-05-27",
|
||||
"2019-08-26",
|
||||
"2019-12-25",
|
||||
"2019-12-26",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user