The value in this repository comes from the conf directory. It is designed to be a technology agnostic set of configuration which can be included into any project no matter what programming language it is written in.
National holidays configuration is stored in YAML files in a hierarchy: Country > Region > Year > Holiday.
Holidays can be one or more days long, have names in various languages, and can be marked as "public holiday" or not. A public holiday is one where everybody in the region is entitled to the day off from work.
Countries are given as ISO 3166-1 alpha-2 country codes, for example gb
.
Regions can be given any meaningful name in ASCII, for example united_kingdom01
.
Languages are given as ISO 639-1 codes, eg. en
.
This repository ships with a test suite written in Ruby using MiniTest. To run the tests:
$ gem install bundler
$ bundle install
$ bundle exec rake test
View the current coverage in docs/coverage.md.
This project is managed with Github. To add a new country or update an existing one, open a Pull Request with your proposed changes.
We have adopted the Contributor Covenant as our code of conduct. For full details see CODE_OF_CONDUCT.md.
To write a library we recommend importing this configuration via git submodules. For an example see national-holidays-ruby.
We run CharlieHR where knowing about public and national holidays helps us calculate time off for 1000s of companies.