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

Wrong UnitedKingdom holidays for 2012 #315

Closed
ludsoft opened this issue Jan 25, 2019 · 3 comments · Fixed by #316
Closed

Wrong UnitedKingdom holidays for 2012 #315

ludsoft opened this issue Jan 25, 2019 · 3 comments · Fixed by #316

Comments

@ludsoft
Copy link

ludsoft commented Jan 25, 2019

workalendar==4.0.0 from PYPI
python 3.6 on LINUX

Hi, thanks for this library that is exactly what I'm looking for.
One issue I have is with holidays in the UK that seem to be wrong for years when the government "randomly" decided to add some. The last example is the Queen’s Diamond Jubilee.
Here is the official link: https://www.gov.uk/bank-holidays with 2012 at the end of the page.

The great thing about this year is:

  • There is an additional bank holiday on June 5
  • The usual Spring bank holiday is not the last Monday of May (May 28) but June 4.

I don't have a complete list (yet) but there are other years with similar holiday like 2002.

Are these holiday something you see being in the scope of workalendar?
I'll probably fork your repo to manage them anyway so I'm interested to know if you are open to a PR to manage these cases. If it's the case there may be a way you prefer me to go to manage this.

Bellow the code I run with the missing and wrong date:

from workalendar.europe import UnitedKingdom 
cal = UnitedKingdom()
cal.holidays(2012)

Gives me:
[(datetime.date(2012, 1, 1), 'New year'),
(datetime.date(2012, 1, 2), 'New Year shift'),
(datetime.date(2012, 4, 6), 'Good Friday'),
(datetime.date(2012, 4, 8), 'Easter Sunday'),
(datetime.date(2012, 4, 9), 'Easter Monday'),
(datetime.date(2012, 5, 7), 'Early May Bank Holiday'),
(datetime.date(2012, 5, 28), 'Spring Bank Holiday'),
(datetime.date(2012, 8, 27), 'Late Summer Bank Holiday'),
(datetime.date(2012, 12, 25), 'Christmas Day'),
(datetime.date(2012, 12, 26), 'Boxing Day')]

Thanks.

@brunobord
Copy link
Member

Hi,
First of all, thank you for your interest in this library.

I'll probably fork your repo to manage them anyway so I'm interested to know if you are open to a PR to manage these cases.

Absolutely. It has already happened in other calendars that days would appear for a brief period of time, and then disappear or being replaced by other, change names, etc.
The most recent example I have in mind is the South African calendar. As you can see, fixed and variable holidays have evolved.

If you can, please make a PR to solve this issue that can be considered as a bug, that'd be great!

@ludsoft
Copy link
Author

ludsoft commented Feb 1, 2019

I've made the pull request, let me know if there is anything I need to change.

brunobord added a commit that referenced this issue Feb 7, 2019
**New calendars**

*WARNING* Scotland (sub)calendars are highly experimental and because of their very puzzling rules, may be false. Please use them with care.

- Added Scotland calendars, i.e. Scotland, Aberdeen, Angus, Arbroath, Ayr, Carnoustie & Monifieth, Clydebank, Dumfries & Galloway, Dundee, East Dunbartonshire, Edinburgh, Elgin, Falkirk, Fife, Galashiels, Glasgow, Hawick, Inverclyde, Inverness, Kilmarnock, Lochaber, Monifieth, North Lanarkshire, Paisley, Perth, Scottish Borders, South Lanarkshire, Stirling, and West Dunbartonshire (#31).

**Bugfixes**

- Fixed United Kingdom bank holiday for 2002 and 2012, thx @ludsoft (#315).
- Fix a small flake8 issue with wrong indentation (#319).
- Fix Russia "Day of Unity" date, set to November 4th, thx @alexitkes for the bug report (#317).
@brunobord brunobord mentioned this issue Feb 7, 2019
@brunobord
Copy link
Member

Your patch is part of the v4.1.0, released and published on PyPI. Enjoy!

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

Successfully merging a pull request may close this issue.

2 participants