Timedelta for business time. Calculate the exact working time between two datetimes (hours, seconds). Supports custom schedules, holidays, and time zones.
Currently we have as simple rule which defines the hours per day/week/month and year. So on a normal business a working day is 8 hours, a week 40 hours, a month 160 hours and a year 1920.
I have implemented some code that translates a normal timedelta to a timedelta which takes in account the working hours per day/week/month/year.
So for example (using the previous explained rules):
9 hours is translated to 1 day and 1 hour.
41 hours is translated to 1 week and 1 hour.
49 hours is translated to 1 week 1 day and 1 hour.
I'm wonder if you think this functionality is useful for your library. Any feedback well be very welcome.
Of course, let me know if something that I have explained is not clear enough, as I will try to explain it better.
Hi,
On the Tryton project we are currently searching for a library to calculate timedelta relative to business hours and we found your library that may be useful for us.
Currently we have as simple rule which defines the hours per day/week/month and year. So on a normal business a working day is 8 hours, a week 40 hours, a month 160 hours and a year 1920.
I have implemented some code that translates a normal timedelta to a timedelta which takes in account the working hours per day/week/month/year.
So for example (using the previous explained rules):
I'm wonder if you think this functionality is useful for your library. Any feedback well be very welcome.
Of course, let me know if something that I have explained is not clear enough, as I will try to explain it better.