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.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.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c755316a2c282c10fbf368dc1045a2c2acec9c5e246518bb42db5592273c4cb |
|
MD5 | 559e0b6f81f274ff92cc16420951d5aa |
|
BLAKE2b-256 | 928a94e617214222e3e6ebfa7476035570618b10d072038a5cf3cd1180b57d7f |