Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Pre-configures business_time gem for german holidays from 2000 until 2099

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 business_time-de.gemspec
Octocat-spinner-32 test_suite.rb
README.md

Business Time for Germany

The business_time brings business time & days calculations to ActiveSupport.

This gem pre-configures it for all german holidays, both fixed (Neujahr, Tag der Arbeit, Tag der Deutschen Einheit, Weihnachten) and moving (Easter & it's friends Pfingsten and Himmelfahrt). The easter date is calculated using the date_easter gem, Pfingsten & Himmelfahrt are calculated based on that, so no hard-coded values here.

The holidays are defined for (2000..2035), which should be sufficient (on Ruby 1.9 they can be defined much further up, but Times after 2037 tend to fail with time out of range on Ruby 1.8.7...)

Usage

gem install business_time-de
# OR
gem 'business_time-de'

require 'business_time-de'
7.business_days.after(Date.parse("2012-03-28")) # => "2012-04-10" (because of easter)

For more information on the usage of the business_time gem please check out it's documentation.

License

Copyright (c) 2012 Christoph Olszowka, Capita Unternehmensberatung GmbH. Released under MIT License, see LICENSE for more details.

Something went wrong with that request. Please try again.