Skip to main content

A collection of Workingdays date utilities/helper functions.

Project description

workingdays Package:

python package of date functions/utilities centered around workday calculations.

dateCleanup

All of the "workingday" functions first pass through the "dateCleanup" utility before executing. The dateCleanup converts a string to datetime (y, m, d, h, M, s). It can convert alpha numeric, German date formats, timestamps with seperators (":"" or "-"), timestamps without spaces between date and time ('YYYY-MM-DDhh:mm:ss' to 'YYYY-MM-DD hh:mm:ss' or 'YYYY:MM:DDhh:mm:ss' to 'YYYY-MM-DD hh:mm:ss'), or datetime with no seperators.

The "datevalue" is expected to be Type string unless epoch=True, Then datevalue expected to be Type Int.

workday

Returns a string ("%Y%m%d") of the workingday based off the offset. Optionial Holidays can be passed.

workdayStart

Returns a string ("%Y%m%d") of the workingstart based off the offset. Optionial Holidays can be passed.

compareWorkingdays

Returns the days (Int) between two working dates. Optionial Holidays can be passed.

lastWorkdayofMonth

Returns a string ("%Y%m%d") of the last workingday of the month. . Optionial Holidays can be passed.

lastWorkdayofQtr

Returns a string ("%Y%m%d") of the lastWorkdayofQtr. Optionial Holidays can be passed. Default qtrs are based off "Calendar Years", but Optional kwarg can change the Qtr "Months" (Can be a list or dict).

example:

quarters =  {"Q1": ["Nov", "Dec", "Jan"],
             "Q2": ["Feb", "Mar", "Apr"],
             "Q3": ["May", "Jun", "Jul"],
             "Q4": ["Aug", "Sep", "Oct"]}

lastWorkdayofQtr('20200213', key=quarters)

Results

 '20200430'

lastDayofMonth

Returns a string ("%Y%m%d") of the lastDayofMonth.

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

workingdays-20.10.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distributions

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

workingdays-20.10.2-py3.7.egg (17.3 kB view details)

Uploaded Egg

workingdays-20.10.2-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file workingdays-20.10.2.tar.gz.

File metadata

  • Download URL: workingdays-20.10.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

File hashes

Hashes for workingdays-20.10.2.tar.gz
Algorithm Hash digest
SHA256 5d5cd16d95e8e693884d17b834070a14701ef8d99f23eac96b4724d5607a95a2
MD5 91901806850b24afae51f239fe1e1ec7
BLAKE2b-256 e36b85b3c522f80b942ae60e118373c08eb34a096587259f896d0dcc4e6459ad

See more details on using hashes here.

File details

Details for the file workingdays-20.10.2-py3.7.egg.

File metadata

  • Download URL: workingdays-20.10.2-py3.7.egg
  • Upload date:
  • Size: 17.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

File hashes

Hashes for workingdays-20.10.2-py3.7.egg
Algorithm Hash digest
SHA256 ab6101a03cb23b351b0fd2b4a02e61f4cd5465358d9cfc34d75f95b1c3e3f831
MD5 0b5cdb976b69c1564d74a407dea2cb66
BLAKE2b-256 5999ab990b2a85ee9a345938ed17eea99c4c6f6978b4727212f12bd398737872

See more details on using hashes here.

File details

Details for the file workingdays-20.10.2-py3-none-any.whl.

File metadata

  • Download URL: workingdays-20.10.2-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

File hashes

Hashes for workingdays-20.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8842a41639a93c5d9fd3ec4c9b83e7ba87876779bc31d962af4e5754413b04b9
MD5 6eea72af9a41b4b63384c419357ded87
BLAKE2b-256 62ff4643f8bb8a747e9c3371980e02db85801b7a2dad2e3fd71a4750b991e569

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