wwdates 
Global calendar system. Python package.
wwdates fetches official holiday calendars for Brazil (ANBIMA, FEBRABAN, B3) and the United
States (Nasdaq, Federal Holidays), then layers a rich set of working-day / date helpers on top —
is_working_day, add_working_days, working_days_range, delta_working_days, timezone-aware
conversions, and more. Fetched calendars are cached locally so repeated calls stay fast and
offline-friendly.
📖 Full documentation: https://guilhermegor.github.io/wwdates/
✨ Key Features
🗓️ Holiday providers
One class per calendar source; all share the same date-operations surface — they differ only in which holidays they load.
Most sources come in two flavours: an offline class (the default — no network, no cache) and
a *Web class that reads the publisher's live page.
| Provider | Import | Holidays |
|---|---|---|
DatesBRAnbima |
wwdates.br.anbima |
🇧🇷 ANBIMA national holidays (offline, recommended) |
DatesBRAnbimaWeb |
wwdates.br.anbima_web |
🇧🇷 The same set, fetched live from ANBIMA |
DatesBRFebraban |
wwdates.br.febraban |
🇧🇷 FEBRABAN bank holidays (offline, recommended) |
DatesBRFebrabanWeb |
wwdates.br.febraban_web |
🇧🇷 The same set, fetched live from FEBRABAN |
DatesBRB3 |
wwdates.br.b3 |
🇧🇷 National + B3 exchange non-trading days (offline, recommended) |
DatesBRB3Web |
wwdates.br.b3_web |
🇧🇷 Scraped from B3's trading calendar (2021–2026 only) |
DatesUSNasdaq |
wwdates.us.nasdaq |
🇺🇸 Nasdaq market closures |
DatesUSFederalHolidays |
wwdates.us.federal_holidays |
🇺🇸 US federal holidays (offline, recommended) |
DatesUSFederalHolidaysWeb |
wwdates.us.federal_holidays_web |
🇺🇸 US federal holidays via live scrape |
⚙️ Shared calendar operations
Every provider inherits the full surface: working-day predicates (is_working_day, is_holiday,
is_weekend), business-day arithmetic (add_working_days, nearest_working_day,
get_nth_weekday_month), ranges & deltas (working_days_range, delta_working_days,
delta_working_hours), timezone/timestamp conversions, and locale-aware formatting. See the
API Reference for the complete list.
🚀 Getting Started
Prerequisites
- Python 3.10+
- Poetry (recommended)
Installation
pip install wwdates
Or with Poetry:
poetry add wwdates
Everything works offline after install — no browser needed. The recommended
DatesUSFederalHolidays computes federal holidays locally.
Optional: the browser-scrape provider ([web] extra)
Only the DatesUSFederalHolidaysWeb provider needs a browser — it scrapes
federalholidays.net with Playwright, which is not installed by the base package. It is
vital only if you specifically want that provider's live-scraped dates; otherwise skip this
entirely and use the offline DatesUSFederalHolidays.
To enable it, install the optional web extra (note the brackets — quote them so the shell does
not glob), then fetch the browser binary:
pip install "wwdates[web]" # adds Playwright
playwright install chromium # one-time browser download (pip cannot do this step)
Without both steps, constructing/using DatesUSFederalHolidaysWeb raises a clear ImportError
telling you to run them.
Quick start
from datetime import date
from wwdates.br.b3 import DatesBRB3
cls_cal = DatesBRB3()
cls_cal.is_working_day(date(2024, 12, 25)) # False — Christmas
cls_cal.add_working_days(date(2024, 12, 24), 3) # skips holidays + weekends
cls_cal.holidays() # [(name, date), ...]
DatesBRB3 here is just an example — the same methods work on every provider; only the loaded
holiday set differs. More recipes in the
Examples guide.
📚 Documentation
- Usage — install, providers, basics
- Examples — task-oriented recipes
- API Reference — every class and method
- FAQ — common questions & troubleshooting
- Contributing — dev setup, tests, releasing
- Changelog — release history
🛠️ Development
git clone https://github.com/guilhermegor/wwdates.git
cd wwdates
make init # or: bash tasks.sh init (venv + deps + pre-commit hooks)
make unit_tests # run the test suite
make install_dist_locally # build the wheel and smoke-import it
See Contributing for the full branch/PR workflow and CI gate.
👨💻 Authors
🔗 Useful Links
🤝 Contributing
Issues and PRs are welcome. Please read CONTRIBUTING.md first for dev setup,
tests, the branch/PR workflow, and the CI gate.
📜 License
This project is licensed under the MIT License — see LICENSE for details.
Metadata
Release files for wwdates 2.0.0
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 | |
|---|---|---|---|---|
| wwdates-2.0.0.tar.gz | 66.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wwdates-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 158.5 kB
Release files / wwdates-2.0.0.tar.gz
| Download URL | wwdates-2.0.0.tar.gz |
|---|---|
| Size | 66.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ddd7040ddc298d113107b2df0ac071bd2c912c93fa5743590535014e4e27300
|
|
BLAKE2b-256 checksum How to use checksums |
1dd839ce9e767f647061444d54c3bf75f3b4d96f09a355cce8757c64c228b8e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logRelease files / wwdates-2.0.0-py3-none-any.whl
| Download URL | wwdates-2.0.0-py3-none-any.whl |
|---|---|
| Size | 91.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea0e95c6dc2fda9ce2726a0ac31ae958c35d86bef05d7eb9e991b1a187392f12
|
|
BLAKE2b-256 checksum How to use checksums |
c03f398b43ded42d3c07fd2cb11f6c50b66fc275f88819f39330bf6397258153
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logSecurity for wwdates 2.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wwdates-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 3, 2026.
Transparency logA 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.