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

UK Needs province #40

Closed
GadgetSteve opened this issue Jan 27, 2017 · 5 comments
Closed

UK Needs province #40

GadgetSteve opened this issue Jan 27, 2017 · 5 comments

Comments

@GadgetSteve
Copy link

Currently the United Kingdom has no province/state member but there are different bank holidays between the countries that make up the UK.

Specifically with E=England, W=Wales, S=Scotland, N=Northern Ireland, R=Republic of Ireland & M=Isle of Man and with all holidays movable to the next working day in the case of not falling on a working day:

  • 1 January (New Year's Day) - EWSNRM
  • 2 January - S
  • 17 March (St Patrick's Day) - NR
  • The Friday before Easter Sunday (Good Friday) - EWSN M
  • The Monday after Easter Sunday (Easter Monday) - EW NRM
  • First Monday in May[2][3] (May Day, Early May Bank Holiday) - EWSNRM
  • Last Monday in May[4][5] (Spring Bank Holiday) - EWSN M
  • First Monday in June (June Bank Holiday) - R
  • First Friday in June (TT Bank Holiday) - M
  • 5 July (Tynwald Day) - M
  • 12 July (The Twelfth, Battle of the Boyne) - N
  • First Monday in August (Summer Bank Holiday) - S R
  • Last Monday in August (Late Summer Bank Holiday, August Bank Holiday) - EW N M
  • Last Monday in October (October Bank Holiday) - R
  • 30 November (St Andrew's Day) - S
  • 25 December (Christmas Day) - EWSNRM
  • 26 December (Boxing Day, St Stephen's Day) - EWSNRM

The really confusing one is that if Christmas day falls on a weekend day it is move to the day after Boxing Day so that if the 25th is Saturday then Boxing Day will be moved from Sunday to Monday and Christmas Day will have a substitute day on the 28th.

Please consider adding these regions with their specific holidays to this tool

ghost pushed a commit that referenced this issue Jan 29, 2017
@ghost
Copy link

ghost commented Jan 29, 2017

I added the individual countries separately as they are countries and not provinces. If you could take a look at the new additions and let me know if you see any problems that would be terrific, thanks!

holidays.England()
holidays.Wales()
holidays.Scotland()
holidays.NorthernIreland()
holidays.Ireland()
holidays.IsleOfMan()

@GadgetSteve
Copy link
Author

Thanks for the quick response. The only problem is that while you are correct that all of them are individual countries they are also a part of the UK, (except Isle of Man, a self-governing crown dependency and the Republic of Ireland, no longer a part of the United Kingdom), so the entries for UK should either require a member state/country, possibly defaulting to England & Wales which will annoy some or do as diaries do and show them all with qualifiers on those that are not for all of England, Wales, Scotland, Northern Ireland & Isle of Man - some physical diaries include Eire or RoI so as to increase their distribution.

Maybe if the constructor for UK were to have members for each of them, get the holidays for each of the member states and any that weren't common to all add a suffix for which.

N.B. If you go for the suffix or the adding a state/province/country to UK please don't include Ireland/Eire/RoI as that will cause upset as well.

@ghost
Copy link

ghost commented Feb 2, 2017

Here is an attempt at adding qualifiers to the holiday names (only when generated with holidays.UnitedKingdom() or holidays.UK()). What do you think of this?

>>> import holidays
>>> for date, name in sorted(holidays.UK(years=2016).items()):
...     print date, name
... 
'2016-01-01' New Year's Day
'2016-01-02' New Year Holiday [Scotland]
'2016-01-04' New Year Holiday [Scotland] (Observed)
'2016-03-17' St. Patrick's Day [Northern Ireland]
'2016-03-25' Good Friday
'2016-03-28' Easter Monday [England, Wales, Northern Ireland]
'2016-05-02' May Day
'2016-05-30' Spring Bank Holiday
'2016-07-12' Battle of the Boyne [Northern Ireland]
'2016-08-01' Summer Bank Holiday [Scotland]
'2016-08-29' Late Summer Bank Holiday [England, Wales, Northern Ireland]
'2016-11-30' St. Andrew's Day [Scotland]
'2016-12-25' Christmas Day
'2016-12-26' Boxing Day
'2016-12-27' Christmas Day (Observed)
>>> 

@GadgetSteve
Copy link
Author

Looks good!

ghost pushed a commit that referenced this issue Feb 2, 2017
@ghost
Copy link

ghost commented Feb 2, 2017

Great, thanks for the help on this!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant