Skip to content

Conversation

@confusedbuffalo
Copy link

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.

@ypid ypid changed the base branch from master to develop October 12, 2025 08:54
@ypid
Copy link
Member

ypid commented Oct 12, 2025

@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?

@confusedbuffalo
Copy link
Author

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}
Copy link
Collaborator

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.

Copy link
Member

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.

Copy link
Author

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?

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 this pull request may close these issues.

3 participants