ri_state_holidays 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ri_state_holidays.rb +0 -8
- data/ri_state_holidays.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f69b8ee49d4aeda46acd68a4f313be954d9d626a
|
4
|
+
data.tar.gz: 5879d07a7493d6a6faaa3e444fc4c45b0c66f812
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33dfdceb8ac0ecce8cf4958a16b7870573e1bf49c4df90d2de5959c4b28f84491107fb689f9ba7ad885db5a37af7fcc5b80e7885aaeea677de84a430589825a7
|
7
|
+
data.tar.gz: bc6cd743ee8d816a2eceedb8da62f76cc11cf16303a58c8b82d9f1380b47246bd90ffae69b0153c7ad4eead15e4fd374171b0e27b49b53d467fcf73ade987c13
|
data/lib/ri_state_holidays.rb
CHANGED
@@ -113,7 +113,6 @@ module RiStateHolidays
|
|
113
113
|
1 => [
|
114
114
|
{:mday => 1, :observed => lambda { |date| to_weekday_if_weekend(date) }, :observed_id => "to_weekday_if_weekend", :name => "New Year's Day", :regions => [:us, :us_ri]},
|
115
115
|
{:wday => 1, :week => 3, :name => "Martin Luther King, Jr. Day", :regions => [:us, :us_ri]},
|
116
|
-
{:function => lambda { |year| us_inauguration_day(year) }, :function_id => "us_inauguration_day(year)", :name => "Inauguration Day", :regions => [:us_dc, :us_ri]}
|
117
116
|
],
|
118
117
|
5 => [
|
119
118
|
{:wday => 1, :week => -1, :name => "Memorial Day", :regions => [:us, :us_ri]},
|
@@ -143,13 +142,6 @@ module RiStateHolidays
|
|
143
142
|
private_class_method :get_holidays_by_month
|
144
143
|
|
145
144
|
|
146
|
-
# January 20, every fourth year, following Presidential election
|
147
|
-
def self.us_inauguration_day(year)
|
148
|
-
year % 4 == 1 ? 20 : nil
|
149
|
-
end
|
150
|
-
private_class_method :us_inauguration_day
|
151
|
-
|
152
|
-
|
153
145
|
# Return the Tuesday after the first Monday
|
154
146
|
def self.us_election_day(year)
|
155
147
|
month = 11
|
data/ri_state_holidays.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ri_state_holidays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Alba
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
76
|
version: '0'
|
77
77
|
requirements: []
|
78
78
|
rubyforge_project:
|
79
|
-
rubygems_version: 2.
|
79
|
+
rubygems_version: 2.5.1
|
80
80
|
signing_key:
|
81
81
|
specification_version: 4
|
82
82
|
summary: Based off the Holidays Ruby gem -- but without altering the Date class
|