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
WorkingDays plugin #868
Comments
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 |
@ConorWatsonSoar Hi, I'd like to contribute to your businessDays plugin, but it seems the repo is not maintained anymore?(issues are not treated) If so I'd be happy either to get involved in its development on your repo or to fork it and keep developing it on my side since I really need such a feature. Looking forward to hearing from you |
@iamkun how are users' needs determined? Some other repos use "👍" count on each proposal, is it the case here? I feel that a business days plugin would be useful for many people since moment-business-days is downloaded 58k times / week |
yes, it's worth taking a look at https://www.npmjs.com/package/moment-business-days to see if we should support it as an official plugin. |
I also have the same requirement of working days plugin |
Additional Prior ArtIn case this helps an official business days plugin happen, |
It seems like @reediculous456 has an updated, maintained version over here:
|
@iamkun now that a few years have passed, what's your current take on getting an official first-party plugin for business days / working days in Day.js? |
Issue type
proposal
Description
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.
The text was updated successfully, but these errors were encountered: