Python business datetimes
Project description
opendate
A wrapper around Pendulum with business (NYSE default, extendable) days/hours awareness.
Documentation pending, see tests for examples. Functionality is near-identical to Pendulum with the exception of a business modifier.
The main module is named date
rather than pendulum
Ex:
from date import Date, DateTime, Time, Interval
thedate = Date.today()
# add days
thedate.add(days=5)
thedate.business().add(days=5) # add 5 business day
# subtract days
thedate.subtract(days=5)
thedate.business().subtract(days=5) # subtract 5 business day
# start of month
thedate.start_of('month')
thedate.business().start_of('month') # end of month + N days until valid business day
# end of month
thedate.end_of('month')
thedate.business().end_of('month') # end of month - N days until valid business day
# ...
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
opendate-0.1.8.tar.gz
(15.8 kB
view details)
Built Distribution
opendate-0.1.8-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file opendate-0.1.8.tar.gz
.
File metadata
- Download URL: opendate-0.1.8.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.11.9 Linux/6.5.0-1023-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e3680fcca60e898479b061241b385b501ff3dc1eb101221f9fd2aa2c82b15cd |
|
MD5 | cc217aff7bc484ee9412d2f163b6d504 |
|
BLAKE2b-256 | 0c09f4bfc4e764736bdde88160e458c2d162569a6e20654ca30a06d56d98ee48 |
File details
Details for the file opendate-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: opendate-0.1.8-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.1 CPython/3.11.9 Linux/6.5.0-1023-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d4fff8633ab755c8e0d9e2ccac783b11291f4534367d748df7f1772eaf0502b |
|
MD5 | ec4abfc35f2d31f889bf221e5422c087 |
|
BLAKE2b-256 | 09227d9cdc247d9a0ee8e654dc45ede92649b58d98a7afbb79a823bf60050e54 |