Workadays:
Pacote para calcular dias úteis, dias corridos e dias na base 360 (30/360).
Há calendários de feriados do Brasil, Estados Unidos, Luxemburgo, Reino Unido e Argentina.
Considera o novo feriado dos EUA, Juneteenth. Consulte: https://pt.wikipedia.org/wiki/Juneteenth
Considera o novo feriado nacional de 20/Nov (Conciência Negra)
Calendário de dias úteis:
import datetime as dt
from workadays import workdays as wd
Dias corridos
d1 = dt.date(2018, 1, 7)
d2 = dt.date(2020, 12, 31)
print(wd.days(d1, d2)) # 1089
Dias corridos, base 30U/360, método americano
d1 = dt.date(2018, 1, 7)
d2 = dt.date(2020, 12, 31)
print(wd.days360(d1, d2, method_eu=False)) # 1074
Dias corridos, base 30E/360, método europeu
d1 = dt.date(2018, 1, 7)
d2 = dt.date(2020, 12, 31)
print(wd.days360(d1, d2, method_eu=True)) # 1073
Diferença de dias úteis entre duas datas
d1 = dt.date(2018, 1, 7)
d2 = dt.date(2020, 12, 31)
print(wd.networkdays(d1, d2)) # 750
Diferença de dias úteis entre duas datas sem calendário de feriados (considera apenas os finais de semana como dia não útil)
d1 = dt.date(2018, 1, 7)
d2 = dt.date(2020, 12, 31)
print(wd.networkdays(d1, d2, country=None)) # 779
# Soma 252 dias úteis com calendário de feriados padrão do Brasil
d1 = dt.date(2018, 1, 7)
print(wd.workdays(d1, 252)) # 09/01/2019
Soma 252 dias úteis a data de referência utilizando o calendário Brasil e de SP
d1 = dt.date(2018, 1, 7)
print(wd.workdays(d1, 252, country=None)) # 25/12/2018
Verifica se é feriado
d1 = dt.date(2018, 1, 7)
print('É feriado? ', wd.is_holiday(d1, country='BR', years=range(2020, 2021)))
Verifica se é final de semana
d1 = dt.date(2018, 1, 7)
print('É final de semana? ', wd.is_weekend(d1))
Verifica se é dia útil
d1 = dt.date(2018, 1, 7)
print('É dia útil? ', wd.is_workday(d1, country='BR', years=range(2020, 2021)))
Verifica se é ano bissexto
print('É ano bissexto? ', wd.is_leap_year(2008))
Exibe a lista de feriados do Brasil e de São Paulo
for date in wd.get_holidays(country='BR', state='SP', years=range(2020, 2022)):
print(date)
Exibe a lista de feriados da Inglaterra e das Libor's
for date in wd.get_holidays(country='England', years=range(2019, 2023)):
print(date)
Metadata
Release files for workadays 2023.12.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| workadays-2023.12.30.tar.gz | 36.6 kB | Without provenance | Details for workadays-2023.12.30.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| workadays-2023.12.30-py3-none-any.whl | Python 3 | none | any | Details for workadays-2023.12.30-py3-none-any.whl |
Total release size: 57.9 kB
Release files / workadays-2023.12.30.tar.gz
| Download URL | workadays-2023.12.30.tar.gz |
|---|---|
| Size | 36.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32999c996f45e126bb85bb1a2b2cbc8f4043609132015efcc77af675fa133592
|
|
BLAKE2b-256 checksum How to use checksums |
c68a046bad09b2f0f68731190f09f3c4d582e49feb07c1292b1f55d221f36ee4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / workadays-2023.12.30-py3-none-any.whl
| Download URL | workadays-2023.12.30-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97cf5feb72982212aa74783d17a296434d1a9890885f6d08426096124fcf99b6
|
|
BLAKE2b-256 checksum How to use checksums |
efe16260bb0358ce71a15494b1248eef9eece7bedf60241f94b0b9b2d1c3a14c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for workadays 2023.12.30
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.