Gouvernement Calendar Data Compilator
This library fetches data from the governement sources and APIs for national days off and school holidays, and compile it into a JSON file.
Library usage
Add the gem to your Gemfile or *.gemspec file:
gem 'gouv-calendar-compilator'
Then use it:
require 'gouv-calendar-compilator'
Wherever you wanna use the data, create a new GouvCalendarCompilator::DataCompilator object and call the compile
method like so:
data_compilator = GouvCalendarCompilator::DataCompilator.new
data_compilator.compile
The compile method will return a ruby Array of Hashes where each Hash represents a period of time containing the data formatted like so:
[
{
start: "2021-10-10",
end: "2021-10-11",
coefficient: 0
},
...
]
start is a string containing the beginning date of the period of time (should always be the same than the previous period of time end field) end is a string containing the date of the day after the end of the period of time coefficient is an integer (possible values 0, 1, 2) representing the type of period it is, correspnding to:
0 = Working Day 1 = School Holidays 2 = Holiday
Contributing
Thanks to think of contributing.
We are open to contributions. Please feal free to create an issue covering what you wanted to do and to create a PR directed to the develop branch for it to be accepted.
We do not have clear development roadmap, because we will contribute to this project on the need for us. This won't prevent to have time answering to your needs, and welcome test cases or other bug reports.
Please:
- respect each others (take example to existing code of conducts like the one of Atom for example).
- do not use issues or PR comments for anything else than the purpose of this project.
We will use censorship when a comment is deemed (by us - project managers) as inappropriate (Trolling, insults or any other non-productive discussions which does not deserve to be stored).