Skip to main content

General TBG Utilities

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tbgutils-1.1.4.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tbgutils-1.1.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file tbgutils-1.1.4.tar.gz.

File metadata

  • Download URL: tbgutils-1.1.4.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for tbgutils-1.1.4.tar.gz
Algorithm Hash digest
SHA256 170431eecdc059c6cb2d6e06819548eb2a2df8fbe5c77757d3a2642ca717d123
MD5 c119d4882e0c31cfcedcbd72780ced8b
BLAKE2b-256 566c408d5ace93ddcdacb64c51d4aaf6494997396011a7ea5ede4f838b75b34c

See more details on using hashes here.

File details

Details for the file tbgutils-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: tbgutils-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for tbgutils-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c9160097062fed6411788d3ab2c63e21e72fbc70983ceeae221f6476bc65da3b
MD5 44371045858f4516334625aaddeaeca7
BLAKE2b-256 fa50f3c7d07194c798585e04e30fc9c49964ce1438b4d119e1e0cbfaea88fad8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page