skip to navigation
skip to content

Not Logged In

businesstime 0.1.3

A simple utility for calculating business time aware timedeltas between two datetimes

businesstime

https://badge.fury.io/py/businesstime.png https://travis-ci.org/seatgeek/businesstime.png?branch=master

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.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
 
File Type Py Version Uploaded on Size
businesstime-0.1.3.macosx-10.8-x86_64.exe (md5) MS Windows installer any 2014-01-28 65KB
businesstime-0.1.3.tar.gz (md5) Source 2014-01-28 4KB
  • Downloads (All Versions):
  • 57 downloads in the last day
  • 361 downloads in the last week
  • 1465 downloads in the last month
  • Author: SeatGeek
  • Home Page: http://github.com/seatgeek/businesstime
  • License:
    Copyright (c) 2014, SeatGeek, Inc.
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
    
    Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    
    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Categories
  • Package Index Owner: erwaller
  • DOAP record: businesstime-0.1.3.xml