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

Allow plusBusiness etc to accept a custom holiday matcher as param #63

Open
hdoan-codaio opened this issue Feb 11, 2022 · 2 comments
Open

Comments

@hdoan-codaio
Copy link

In my code, I give user a function to select optional holidays. It's a lot more clean & less prone to error when I can pass these to the methods like plusBusiness, compared to trying to set/unset the matcher each time.

@amaidah
Copy link
Owner

amaidah commented Feb 11, 2022

Can you give an example?

@owstron
Copy link

owstron commented Aug 22, 2023

The current signature is plusBusiness({ days = ONE_DAY } = {})

I think an example would be plusBusiness({ days = ONE_DAY } = {}, customMatchers = { businessDays: [], holidayMatchers: [] } = {})

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

3 participants