Skip to main content

business_calendar

business_calendar is a Python package that implements simple business days calculations. You can use a custom work week and a holiday list.

Downloads Download format TravisCI

Documentation

You can find the latest documentation here.

Example

from business_calendar import Calendar, MO, TU, WE, TH, FR
import datetime
date1 = datetime.datetime(2013,1,10)

# normal calendar, no holidays
cal = Calendar()
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
    (cal.busdaycount(date1, date2), date1, date2))

# don't work on Fridays? no problem!
cal = Calendar(workdays=[MO,TU,WE,TH])
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
    (cal.busdaycount(date1, date2), date1, date2))

# holiday? no problem!
cal = Calendar(workdays=[MO,TU,WE,TH], holidays=['2013-01-17'])
date2 = cal.addbusdays(date1, 25)
print('%s days between %s and %s' % \
    (cal.busdaycount(date1, date2), date1, date2)

License

MIT

History

0.1.0 (2014-06-22)

  • Initial release.

Credits

business_calendar is written and maintained by Antonio Botelho.

Contributors

Please add yourself here alphabetically when you submit your first pull request.

Metadata

Release files for business_calendar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for business_calendar 0.1.0
File Size Uploaded
business_calendar-0.1.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for business_calendar 0.1.0
File Interpreter ABI Platform
business_calendar-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 21.5 kB

Release files / business_calendar-0.1.0.tar.gz

Download URL business_calendar-0.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
548daf86f6078945c413d7eb57fb8d7a5b2fc60152af73b5a8f06cc1d0da7fe5
BLAKE2b-256 checksum
How to use checksums
50af6de9d0c834c14513cb845a1ccfdd48f84ba247da1c474331f6cfeb8af99b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / business_calendar-0.1.0-py2.py3-none-any.whl

Download URL business_calendar-0.1.0-py2.py3-none-any.whl
Size 11.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c3c2393574cfd8e3810231f7b5a027f9bc29bde502af4091372921a1acac7878
BLAKE2b-256 checksum
How to use checksums
3b687b8496784ced8560ad98d08e6a39dae277efeefc52f4bc98822acceebb7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page