Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gouv-calendar-compilator

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gouv-calendar-compilator

  • 1.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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).

FAQs

Package last updated on 23 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc