seatgeek / businesstime

A simple python utility for calculating business time aware timedeltas between two datetimes
BSD 2-Clause "Simplified" License
85 stars 36 forks source link

Add businesshours #21

Closed csoare7 closed 6 years ago

csoare7 commented 6 years ago

Related to https://github.com/seatgeek/businesstime/issues/20

josegonzalez commented 6 years ago

Can you add a test for the times being compared in reverse?

csoare7 commented 6 years ago

Hey sure, thanks for the comment

josegonzalez commented 6 years ago

I'll need to see if I can get access to make a release - should be simple, but its probably associated to the CTO's pypi account so might take a bit.

Thanks for the contribution!

seanmcfeely commented 6 years ago

First, thanks for this library! I replaced a bunch of obtuse code with it.

Second, why was the decision made to have the business_hours method return total seconds? I needed it to return a datetime.timedelta just like the businesstimedelta method. I figure that makes more sense and it's also much easier to convert the output to total seconds.

businesstime_hours.txt

josegonzalez commented 6 years ago

@naes17 given that we havent made a release yet, if you want to change that, I'd gladly accept the change.

csoare7 commented 6 years ago

@naes17 right you are! looking forward to your change 👍