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

Mothering Sunday in the UK #266

Closed
kennydude opened this issue Dec 22, 2021 · 6 comments
Closed

Mothering Sunday in the UK #266

kennydude opened this issue Dec 22, 2021 · 6 comments
Assignees
Milestone

Comments

@kennydude
Copy link

Mothers Day or, the british term, Mothering Sunday is on a different day to the default - https://en.wikipedia.org/wiki/Mothering_Sunday

It would be great if this could be added

@stelgenhof stelgenhof added this to the v2.5.0 milestone Jan 23, 2022
@stelgenhof
Copy link
Member

Hi @kennydude I've added Mothering Sunday for the United Kingdom. You can check/verify the changes in this branch: https://github.com/azuyalabs/yasumi/tree/feature/mothering-sunday

I am targeting this to include it in release 2.5.0 which I plan to release next week. Let me know if something is incorrect or missing.

Cheers!

@stelgenhof stelgenhof self-assigned this Jan 25, 2022
@stelgenhof
Copy link
Member

Feature completed. Work merged into the develop branch.

@Jimbob001
Copy link

@stelgenhof Hi there, was about to write a separate issue when I saw this.

Mothering Sunday isn't classed as a "public holiday", albeit it being a null point given it's always on a Sunday! However, it looks odd appear in the standard holiday list with bank holidays etc.

I know better classification is in the works, to split out these sorts of days, but I wonder whether it's worth having in the standard list until then?

It also doesn't appear in the source cited in your documentation, if that's another factor: https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom

@stelgenhof
Copy link
Member

@Jimbob001 Mothering Sunday isn't classified as 'public' in Yasumi. See here: https://github.com/azuyalabs/yasumi/blob/master/src/Yasumi/Provider/UnitedKingdom.php#L376

Not sure what output or list you are looking at, however note that Yasumi will give you all registered holidays, irrespective of their classification. In case you need only the official (public) holidays, you should use the OffiicalHolidays filter, as explained here: https://www.yasumi.dev/docs/cookbook/filters/

The general documentation sources are in cited in the provider class file, as well as here: https://www.yasumi.dev/docs/providers/gb/ (Bottom of the page).

The source for Mothering day is not shown on the website, however documented with the respective calculation method.

Cheers! Sacha

@Jimbob001
Copy link

@stelgenhof thank you for the response. I was using the standard unfiltered list. Setting to official holidays only gives me two results!

What I've done is manually filtered out the "other" type to remove this and potentially other additions. This matches up with what most people would expect in terms of whether this day counts towards holiday entitlement (which is my use case in a nutshell).

Many thanks for the help :)

@stelgenhof
Copy link
Member

stelgenhof commented Feb 13, 2022

@Jimbob001 I checked myself and indeed it only results in two holidays. This is due the nature of the Filter classes in that they exclusively filter for that particular category.

For your use case, these filters may not give the results you need. Manually filtering out the 'other' holidays is then certainly a solution :) Or you could create your own filter doing all of that.

Cheers! Sacha

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

No branches or pull requests

3 participants