- Notifications
You must be signed in to change notification settings - Fork0
Make working with business days less painful
License
NotificationsYou must be signed in to change notification settings
FundersClub/business-days
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a handful of functions that make working withbusiness days easier. In this context, "business days" are Monday thru Friday, excludingcertain bank holidays.
importbusiness_days# Simply day manipulation.two_business_days_ago=business_days.days_to_now(timzone.now(),2)# More complex business hour calculations.# Mon 07:00 -> Mon 18:30 (expected: 8 business hours)assertEqual(8*3600,business_days.business_timediff(datetime(2016,10,17,7),datetime(2016,10,17,18,30),).total_seconds())
Seetests.py
for more examples.
Note about developing this: If you are going to release a new version, don't forget to tag the release as v0.x.y (or whatever) so that it's easy to refer to specific versions fromrequirements.txt
files.
About
Make working with business days less painful
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published