Holidata is a utility for algorithmically producing holidays for a given locale and year
Project description
Holidata
holidata
is a utility for algorithmically producing holiday data.
Its purpose is mainly for holidata.net.
Holiday data can be produced for a given year in a supported locale and output format.
Usage
holidata --year=<value> --locale=<value> [--output=<value>]
holidata --year=<value> --country=<value> [--lang=<value>] [--output=<value>]
Call holidata
with the --help
option to more detailed information.
Examples
-
Create holiday data of year
2022
for localede-DE
:$ holidata --year=2022 --locale=de-DE
-
Create holiday data of year
2022
for countryBE
and languagefr
:$ holidata --year=2022 --country=BE --lang=fr
-
Create holiday data of year
2022
for countryUS
(default languageen
):$ holidata --year=2022 --country=US
Data
For each holiday the following data is provided:
locale
- language and country the holiday is defined forregion
- region code of the given subdivision the holiday is defined fordate
- actual date the holiday takes placedescription
- name of the holiday in the given languagetype
- holiday type flagsnotes
- additional information
Locales
Holidata provides holiday data in different locales, i.e. for a given country and in a given language. See holidata.net for a complete overview of the currently provided locales.
If you think a locale is missing, open a feature request on GitHub.
Output Formats
Holidata supports different output formats, currently csv
, json
, yaml
, and xml
.
If you think an output format is missing, open a feature request on GitHub.
Limitations
Holidata focuses on holidays which are defined by law on which business or work are suspended or reduced (there may be some exceptions to that rule).
Holidata only provides data for countries and their principal subdivisions (both as they are defined in ISO 3166). Holidays for other subdivisions are either merged or ignored. There is also no explicit representation of partial holidays.
License
holidata
is released under the MIT license.
For details check the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file holidata-2024.8.2.tar.gz
.
File metadata
- Download URL: holidata-2024.8.2.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ba567f68fc62430d8d72cc84595a2f1514f54cbf5c5b77d208464cf3862f1b4 |
|
MD5 | dc690704f856e859e4fb0694fdc0f5cf |
|
BLAKE2b-256 | b49cd4517c3856982973cd1f9470a3a57b157732ce2200f27fb30ba90e9ab990 |
File details
Details for the file holidata-2024.8.2-py3-none-any.whl
.
File metadata
- Download URL: holidata-2024.8.2-py3-none-any.whl
- Upload date:
- Size: 58.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56ded1f04da6d3abfd3b9ae9a8943ca5de558102628d977d9870b2e60fbfdb5b |
|
MD5 | ca0e9c35291dbc29172cf8364aae6526 |
|
BLAKE2b-256 | 206842ae3a923f88f22ebec63e2d857ccfc4c3301a6a182b51e69b1be9555477 |