Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Scotland and Northern Ireland public holidays #415

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ Almost everything from opening_hours definition is supported, as well as some ex
- [Canada][ph-ca]
- [Czech Republic][ph-cz]
- [Denmark][ph-dk]
- [England and Wales][ph-gb]
- [England, Wales, Scotland and Northern Ireland][ph-gb]
- [France][ph-fr]
- [Germany][ph-de] ([footnotes][ph-de] are ignored)
- [Hungary][ph-hu]
Expand Down
25 changes: 25 additions & 0 deletions src/holidays/gb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,28 @@
- {'name': 'Summer bank holiday', 'variable_date': lastAugustMonday}
- {'name': 'Christmas', 'fixed_date': [12, 25]}
- {'name': 'Boxing Day', 'fixed_date': [12, 26]}
'Northern Ireland': # https://www.gov.uk/bank-holidays#northern-ireland
_nominatim_url: https://nominatim.openstreetmap.org/reverse?format=json&lat=54.5950675&lon=-5.9298401&zoom=18&addressdetails=1&accept-language=en
PH:
- {'name': 'New Year’s Day', 'fixed_date': [1, 1]}
- {'name': 'St Patrick’s Day', 'variable_date': 'nextMo-Fr17March'}
- {'name': 'Good Friday', 'variable_date': easter, 'offset': -2}
- {'name': 'Easter Monday', 'variable_date': easter, 'offset': 1}
- {'name': 'Early May bank holiday', 'variable_date': firstMayMonday}
- {'name': 'Spring bank holiday', 'variable_date': lastMayMonday}
- {'name': 'Battle of the Boyne', 'variable_date': 'nextMo-Fr12July'}
- {'name': 'Summer bank holiday', 'variable_date': lastAugustMonday}
- {'name': 'Christmas', 'fixed_date': [12, 25]}
- {'name': 'Boxing Day', 'fixed_date': [12, 26]}
'Scotland': # https://www.gov.uk/bank-holidays#scotland
_nominatim_url: https://nominatim.openstreetmap.org/reverse?format=json&lat=55.9557307&lon=-3.1976026&zoom=18&addressdetails=1&accept-language=en
PH:
- {'name': 'New Year’s Day', 'fixed_date': [1, 1]}
- {'name': '2nd January', 'fixed_date': [1, 2]}
- {'name': 'Good Friday', 'variable_date': easter, 'offset': -2}
- {'name': 'Early May bank holiday', 'variable_date': firstMayMonday}
- {'name': 'Spring bank holiday', 'variable_date': lastMayMonday}
- {'name': 'Summer bank holiday', 'variable_date': lastAugustMonday}
- {'name': 'St. Andrew’s Day', 'variable_date': 'nextMo-Fr30November'}
- {'name': 'Christmas', 'fixed_date': [12, 25]}
- {'name': 'Boxing Day', 'fixed_date': [12, 26]}
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,9 @@ export default function(value, nominatim_object, optional_conf_parm) {
'nextWednesday16Nov' : getDateOfWeekdayInDateRange(3, new Date(year, 10, 16)),
'nextMo-Fr17March' : getDateOfNextWeekdayRange(1, 5, new Date(year, 2, 17)),
'nextMo-Sa01May' : getDateOfNextWeekdayRange(1, 6, new Date(year, 4, 1)),
'nextMo-Fr12July' : getDateOfNextWeekdayRange(1, 5, new Date(year, 6, 12)),
'nextMo-Sa07August' : getDateOfNextWeekdayRange(1, 6, new Date(year, 7, 7)),
'nextMo-Fr30November' : getDateOfNextWeekdayRange(1, 5, new Date(year, 10, 30)),
'nextMo-Sa25December' : getDateOfNextWeekdayRange(1, 6, new Date(year, 11, 25)),
};
}
Expand Down