-
Notifications
You must be signed in to change notification settings - Fork 129
feat: Add and update UK holidays #526
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
base: develop
Are you sure you want to change the base?
Conversation
14730d0 to
fd0c43c
Compare
|
@confusedbuffalo Development happens on the develop branch which is not well known yet. I need to make a release and probably default to the develop branch, but also this weekend, I can not justify spending time on that. Maybe next weekend. I am so sorry for the delay! More details see #341. Want to rebase? |
fd0c43c to
163a353
Compare
|
I see, I know for next time now. I've rebased this and #525 onto develop |
| - {'name': 'Summer bank holiday', 'variable_date': lastAugustMonday} | ||
| - {'name': 'Christmas', 'fixed_date': [12, 25]} | ||
| - {'name': 'Boxing Day', 'fixed_date': [12, 26]} | ||
| - {'name': 'Christmas', 'variable_date': nextMo-Fr25December} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should make this change. Christmas is — and remains — on December 25th. If I understand correctly, you're trying to model substitute bank holidays here, which does make sense in the context of opening hours. However, we haven't introduced proper logic for that yet.
I'd prefer to handle bank holidays correctly (see also #300) rather than bending the date definitions here. I'm holding off on implementing that properly until the next release.
But perhaps @ypid has a different point of view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @KristjanESPERANTO. I don’t have a different opinion on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To play devil's advocate, what about St Patrick’s Day, is that not always on 17th March? But the logic is already here for taking the next Mo-Fr for that holiday.
I do see your point though, and I would agree that an external library would be a better option.
How about renaming the holiday to "Christmas Bank Holiday" or something?
There's a bit of extra logic, because if a public holiday is on a weekend then it is observed on the next weekday. But if that's already a holiday then it's observed on the next weekday. I hope I have the logic correct for that in the code.