Skip to content

Commit

Permalink
Only calculate up to 2035, as Ruby 1.8.7 is incompatible with the future
Browse files Browse the repository at this point in the history
  • Loading branch information
colszowka committed Mar 30, 2012
1 parent 399f35d commit eb3315e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ and moving (Easter & it's friends Pfingsten and Himmelfahrt). The easter date is
[date_easter](https://rubygems.org/gems/date_easter) gem, Pfingsten & Himmelfahrt are calculated based on that,
so no hard-coded values here.

The holidays are defined for `(2000..2099)`, which should be sufficient.
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

Expand Down
2 changes: 1 addition & 1 deletion business_time-de.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
s.authors = ["Christoph Olszowka"]
s.email = ["christoph at olszowka de"]
s.homepage = "https://github.com/capita/business_time-de"
s.summary = %q{Pre-configures business_time gem for german holidays from 2000 until 2099}
s.summary = %q{Pre-configures business_time gem for german holidays from 2000 until 2035}
s.description = s.summary

s.rubyforge_project = "business_time-de"
Expand Down
2 changes: 1 addition & 1 deletion lib/business_time-de.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require 'business_time'
require 'date_easter'

(2000..2099).each do |year|
(2000..2035).each do |year|
easter_sunday = Date.easter(year)
BusinessTime::Config.holidays << easter_sunday # Ostersonntag
BusinessTime::Config.holidays << (easter_sunday - 2.days) # Karfreitag
Expand Down
2 changes: 1 addition & 1 deletion lib/business_time-de/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module BusinessTime
module De
VERSION = "1.0.0"
VERSION = "1.0.1"
end
end

0 comments on commit eb3315e

Please sign in to comment.