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.6
Handle US federal holidays that fall on the weekend but are observed on Friday/Monday (#8)
0.1.5
Fixed a bug (#7) where a datetime after business hours and a datetime during business hours were handled incorrectly
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.6-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b36b4230555a560969f514269cc216b8b73aa55baf4b3948a65af6cf451abdb |
|
MD5 | 1117bf84d8422111a12168e9fada2db8 |
|
BLAKE2b-256 | e8cbd101fd4189bcd79faf7aeb3c97243a2616f23622dc134298cea68d3f724a |