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

Possibility to override default country and locale #2

Open
gogl92 opened this issue Dec 6, 2023 · 1 comment
Open

Possibility to override default country and locale #2

gogl92 opened this issue Dec 6, 2023 · 1 comment

Comments

@gogl92
Copy link

gogl92 commented Dec 6, 2023

In some cases we may need to change the country to use like:

Holiday::country('us')->get($carbon)

and the locale

Holiday::country('Spain')->locale('es')

But still being able to work with the default country/locale if needed.

So we can do:

Holiday::country($user->country_code)->get($carbon)

And get the holidays based on the user's country code.

@gogl92
Copy link
Author

gogl92 commented Dec 6, 2023

I can issue a PR after the PHPUnit one 👍

@gogl92 gogl92 changed the title Possibility to override default country Possibility to override default country and locale Dec 7, 2023
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