-
Notifications
You must be signed in to change notification settings - Fork 13
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 for varying working weeks based on region? #62
Comments
Could you give me an example? |
Could you give me an example of how you want to configure working days that is not currently doable? If you look at the readme: https://github.com/amaidah/luxon-business-days#configure-business-days, you can configure business days or what you are calling working days. Monday to Saturday working week (business days) would be: import { DateTime } from 'luxon-business-days';
const dt = DateTime.local();
const workingWeek = [1, 2, 3, 4, 5, 6]; // Mon - Sat
dt.setupBusiness({ businessDays: workingWeek }); |
I guess what I'm looking for is something that will manage the database or working days for me, we're writing a global time sheeting application and I don't want to have to manage a database of which countries work which days, so taking your example above, I'd like to be able to do:
Better still the system would automatically pick this up, based on the locale set and a method call to dt.getBusinessDays() would return me which days in the current country/locale are working days (e.g. Monday to Thursday [1, 2, 3, 4]) |
Hi, it doesn't look like you support different working weeks (based on region) out of the box? This seems pretty fundamental for a business days plugin?
https://en.wikipedia.org/wiki/Workweek_and_weekend
Please correct me if I'm wrong as I'd love to use your plugin?
Thanks
The text was updated successfully, but these errors were encountered: