Deprecated. See https://github.com/holidays/holidays for much better gem. It does handle Finnish holidays, and does not depend on any external resources.
HolidayCalendar was built to find out which days are national holidays. It was intended to use for Finnish national holidays, but should be easy to customize.
It uses Google ical format calendars, and fetches calendar via http caching retrieved data.
Source code conforms to semantic versioning (http://semver.org/)
Add this line to your application's Gemfile:
gem 'holiday_calendar'
And then execute:
$ bundle
Or install it yourself as:
$ gem install holiday_calendar
require 'holiday_calendar'
c = HolidayCalendar::HolidayCalendar.new
c.holiday?(Date.new(2013, 1, 1)) # => true
Constructor supports two optional hash parameters:
:cal_uri - url to calendar to use, defaults to finnish calendar
:cache_file - specify full path to the cache file
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request