A simple utility for calculating business time aware timedeltas between two datetimes
Project description
businesstime
BusinessTime is a simple utility for calculating business time aware timedeltas between two datetimes. BusinessTime’s understanding of weekends, holidays and business hours can be easily configured in code.
>>> datetime(2013, 12, 26, 5) - datetime(2013, 12, 23, 12)
datetime.timedelta(2, 61200)
>>> bt = businesstime.BusinessTime(holidays=businesstime.USFederalHolidays())
>>> bt.businesstimedelta(datetime(2013, 12, 23, 12), datetime(2013, 12, 26, 5))
datetime.timedelta(1, 18000)
Features
Simple, pythonic, business-time-aware datetime math
A simple declarative format for defining holidays
A number of useful iterators/predicate functions related to holidays/weekends/business hours
0.1.4
Fixed a bug (#6) where two datetimes on the same day but before business hours were handled incorrectly
0.1.3
Fixed a bug (#3) where the first instant of a business day was not considered part of that day
0.1.2
Fix changelog
0.1.1
Fix pypi package
0.1.0
Public Release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for businesstime-0.1.4.macosx-10.8-x86_64.exe
Algorithm | Hash digest | |
---|---|---|
SHA256 | 454b01de3bbb95f4bdd6f921829af9e7c910ecda97271b4259eba1983bb7cb6b |
|
MD5 | 35d3336284d5c14814fdd7dce74c148c |
|
BLAKE2b-256 | 75641171efbac0c43ffd294e9ee73471018a6a5d33fc54a26b553e462bc2468d |