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

Support querying for holidays #76

Open
PureTryOut opened this issue May 7, 2020 · 4 comments
Open

Support querying for holidays #76

PureTryOut opened this issue May 7, 2020 · 4 comments

Comments

@PureTryOut
Copy link
Contributor

I see this skill already depends on the holidays package, and I was wondering if it could allow for questions like "When is the next holiday" (returning e.g. in a week) or "How long is the next holiday" (returning e.g. 3 days) or "What is the next holiday" (returning e.g. summer vacation).

@krisgesling
Copy link
Contributor

I'm not familiar with the package, does it have a method for returning the next holiday in a given location?

If so it sounds like a great addition!

@PureTryOut
Copy link
Contributor Author

It doesn't seem to have a method to query for the next holiday, but you can ask if if <some date> is a holiday in a given country. If there would be 1 holiday per year for a given country, you'd have to ask it a maximum of 364 days I suppose (appending 1 to the date every time) which sounds bad, but seeing it is done locally should be quick enough.

@krisgesling
Copy link
Contributor

and most likely there's a holiday within the next month or two at max. So realistically < 60 operations

@forslund
Copy link
Collaborator

forslund commented May 8, 2020

And holidays can technically be cached at startup as to provide a simple lookup table

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