seppemans / businesstimedelta

Timedelta for business time. Calculate the exact working time between two datetimes (hours, seconds). Supports custom schedules, holidays, and time zones.
MIT License
36 stars 7 forks source link

Add working hours rule #3

Open pokoli opened 8 years ago

pokoli commented 8 years ago

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.

pokoli commented 8 years ago

ping