proposal
recently I had the need for a function that calculate working days (days - weekends - custom array of holidays) from a certain date. I believe it could be easily translated into a plugin if anyone is sharing the same need.
It will be great if you could build your own plugin and publish it to npm so that could share it with others easily.
thanks @iamkun, will surely do :)
Hey @fes300 @iamkun, in a weird turn of events I was looking for the exact same thing yesterday. I forked dayjs yesterday and spent the day writing a BusinessDays plugin. I was intending to put the PR in later on today.
@iamkun, would you rather the plugin was published separately from DayJS? It's just that in your docs you say "Feel free to open a pull request to share your plugin."
The plugin I wrote only supports Business Days (i.e no Holidays) at the moment, as I wanted to discuss that with you @iamkun. Holidays would probably require using Locale, but I see that Locale is also a plugin for Dayjs. Should a plugin require another plugin?
Hi, Of course, all plugins are welcomed.
However, we only choose those PRs which suit most of our users' needs to get merged into our main code.
For plugins that targeting to some specific use case, it's better to manage by their own, such as https://github.com/alibaba-aero/jalaliday
Most helpful comment
Hey guys, we've just published our Business Days plugin to npm. You can also find the source code on our Github.
We are more than happy to accept bugs, improvements and PRs!