holidays 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/definitions/au.yaml +2 -2
- data/definitions/us.yaml +1 -1
- data/lib/generated_definitions/au.rb +2 -2
- data/lib/generated_definitions/fed_ex.rb +1 -1
- data/lib/generated_definitions/north_america.rb +1 -1
- data/lib/generated_definitions/ups.rb +1 -1
- data/lib/generated_definitions/us.rb +1 -1
- data/lib/holidays/date_calculator/day_of_month.rb +3 -3
- data/lib/holidays/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9375295866b446c7a50f08a7e20b4dbecb97d2f
|
4
|
+
data.tar.gz: 3b82fcc48186210c139631fff93aba145c5d1b39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1a141005e644cf21ae5b62fcf1998528ef8694e5e32d0242802761a9519e21e2bd862ac606234dc03fb43ba149844e33be066f30939641286b5813ddced2590
|
7
|
+
data.tar.gz: b3d481b65dfdd56aa7d24f89f979adc8629885e35f5fd4180a5cddf45663766eea2ff8f6e950c09d31573e8cab55a5b567898a31e6d252ef3e18c10a52f2de04
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Ruby Holidays Gem CHANGELOG
|
2
2
|
|
3
|
+
## 3.1.2
|
4
|
+
|
5
|
+
* Do not require Date monkeypatching in definitions to use mday calculations (thanks to https://github.com/CloCkWeRX)
|
6
|
+
|
3
7
|
## 3.1.1
|
4
8
|
|
5
9
|
* Require 'digest/md5' in main 'holidays' module. This was missed during the refactor (thanks to https://github.com/espen)
|
data/definitions/au.yaml
CHANGED
@@ -193,7 +193,7 @@ methods:
|
|
193
193
|
if year < 2006
|
194
194
|
nil
|
195
195
|
else
|
196
|
-
Date.civil(year, 3,
|
196
|
+
Date.civil(year, 3, Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 3, :second, :monday))
|
197
197
|
end
|
198
198
|
end
|
199
199
|
may_pub_hol_sa: |
|
@@ -203,7 +203,7 @@ methods:
|
|
203
203
|
if year >= 2006
|
204
204
|
nil
|
205
205
|
else
|
206
|
-
Date.civil(year, 5,
|
206
|
+
Date.civil(year, 5, Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 5, :third, :monday))
|
207
207
|
end
|
208
208
|
end
|
209
209
|
tests: |
|
data/definitions/us.yaml
CHANGED
@@ -79,7 +79,7 @@ methods:
|
|
79
79
|
end
|
80
80
|
day_after_thanksgiving: |
|
81
81
|
def self.day_after_thanksgiving(year)
|
82
|
-
|
82
|
+
Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 11, 4, 4) + 1
|
83
83
|
end
|
84
84
|
tests: |
|
85
85
|
{Date.civil(2008,1,1) => 'New Year\'s Day',
|
@@ -106,7 +106,7 @@ def self.march_pub_hol_sa(year)
|
|
106
106
|
if year < 2006
|
107
107
|
nil
|
108
108
|
else
|
109
|
-
Date.civil(year, 3,
|
109
|
+
Date.civil(year, 3, Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 3, :second, :monday))
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -117,7 +117,7 @@ def self.may_pub_hol_sa(year)
|
|
117
117
|
if year >= 2006
|
118
118
|
nil
|
119
119
|
else
|
120
|
-
Date.civil(year, 5,
|
120
|
+
Date.civil(year, 5, Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 5, :third, :monday))
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
@@ -15,15 +15,15 @@ module Holidays
|
|
15
15
|
#
|
16
16
|
# ===== Examples
|
17
17
|
# First Monday of January, 2008:
|
18
|
-
#
|
18
|
+
# Holidays::DateCalculatorFactory.day_of_month_calculator.call(2008, 1, :first, :monday)
|
19
19
|
# => 7
|
20
20
|
#
|
21
21
|
# Third Thursday of December, 2008:
|
22
|
-
#
|
22
|
+
# Holidays::DateCalculatorFactory.day_of_month_calculator.call(2008, 12, :third, :thursday)
|
23
23
|
# => 18
|
24
24
|
#
|
25
25
|
# Last Monday of January, 2008:
|
26
|
-
#
|
26
|
+
# Holidays::DateCalculatorFactory.day_of_month_calculator.call(2008, 1, :last, 1)
|
27
27
|
# => 28
|
28
28
|
#--
|
29
29
|
# see http://www.irt.org/articles/js050/index.htm
|
data/lib/holidays/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: holidays
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Dunae
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|