Skip to main content

The Brookhaven Group, LLC (TBG) Utilities

Date and string utilities

These are utilities commonoly used at The Brookhaven Group, LLC

Installation

PyPI Page

$ pip install tbgutils 

or

GitHub

$ pip install  git+https://github.com/TheBrookhavenGroup/tbgutils.git

Examples

Print the beginning of the next day in local time.

>>> from tbgutils.dt import to_date, day_start_next_day
>>> d = to_date('20230320')
>>> print(day_start_next_day(d))
"2023-03-21 04:00:00+00:00

Is holiday observed?

>>> from src.tbgutils.dt import to_date, is_holiday_observed
>>> d = to_date('20230704')
>>> is_holiday_observed(d)
True

Is it a weekend?

>>> from src.tbgutils.dt import is_week_end
>>> d = to_date('20230704')
>>> is_week_end(d)
False
>>> d = to_date('20230319')
>>> is_week_end(d)
True

THE END

Release files for tbgutils 1.1.4

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

Source distribution (sdist)

Source distribution for tbgutils 1.1.4
File Size Uploaded
tbgutils-1.1.4.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tbgutils 1.1.4
File Interpreter ABI Platform
tbgutils-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / tbgutils-1.1.4.tar.gz

Download URL tbgutils-1.1.4.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
170431eecdc059c6cb2d6e06819548eb2a2df8fbe5c77757d3a2642ca717d123
BLAKE2b-256 checksum
How to use checksums
566c408d5ace93ddcdacb64c51d4aaf6494997396011a7ea5ede4f838b75b34c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Release files / tbgutils-1.1.4-py3-none-any.whl

Download URL tbgutils-1.1.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9160097062fed6411788d3ab2c63e21e72fbc70983ceeae221f6476bc65da3b
BLAKE2b-256 checksum
How to use checksums
fa50f3c7d07194c798585e04e30fc9c49964ce1438b4d119e1e0cbfaea88fad8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.2

Release history Release notifications | RSS feed

This release

1.1.4 This release

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

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