https://github.com/gothenburgbitfactory/holidata
Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
https://github.com/gothenburgbitfactory/holidata
calendar holiday holiday-calculation holidays
Last synced: 6 months ago
JSON representation
Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.
- Host: GitHub
- URL: https://github.com/gothenburgbitfactory/holidata
- Owner: GothenburgBitFactory
- License: mit
- Created: 2019-01-23T15:27:32.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T21:53:29.000Z (7 months ago)
- Last Synced: 2025-03-28T20:11:27.545Z (7 months ago)
- Topics: calendar, holiday, holiday-calculation, holidays
- Language: Python
- Homepage: https://holidata.net
- Size: 967 KB
- Stars: 50
- Watchers: 9
- Forks: 14
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
- Authors: AUTHORS
Awesome Lists containing this project
README
# Holidata
`holidata` is a utility for algorithmically producing holiday data.
It is used e.g. by [Taskwarrior](https://taskwarrior.org) and [Timewarrior](https://timewarrior.net),
as well as for [holidata.net](https://holidata.net).Holiday data can be produced for a given year in a supported locale and output format.
## Usage
```
holidata --year= --locale= [--output=]
holidata --year= --country= [--lang=] [--output=]
```
Call `holidata` with the `--help` option to more detailed information.### Examples
* Create holiday data of year `2022` for locale `de-DE`:
```
$ holidata --year=2022 --locale=de-DE
```
* Create holiday data of year `2022` for country `BE` and language `fr`:
```
$ holidata --year=2022 --country=BE --lang=fr
```
* Create holiday data of year `2022` for country `US` (default language `en`):
```
$ holidata --year=2022 --country=US
```## Data
For each holiday the following data is provided:
* `locale` - language and country the holiday is defined for
* `region` - region code of the given subdivision the holiday is defined for
* `date` - actual date the holiday takes place
* `description` - name of the holiday in the given language
* `type` - holiday type flags
* `notes` - additional information## Locales
Holidata provides holiday data in different locales, i.e. for a given country and in a given language.
See [holidata.net](https://holidata.net/locales/) for a complete overview of the currently provided locales.If you think a locale is missing, [open a feature request on GitHub](https://github.com/GothenburgBitFactory/holidata/issues).
## Output Formats
Holidata supports different output formats, currently `csv`, `jsonline`, `yaml`, and `xml`.
## 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](LICENSE) file.