holidays 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 77d44ea4e57f9a700180b0829f9937735a0524a9
4
- data.tar.gz: df50a09e25562ed02a3c1eb22e177e08bbb9898d
3
+ metadata.gz: d9375295866b446c7a50f08a7e20b4dbecb97d2f
4
+ data.tar.gz: 3b82fcc48186210c139631fff93aba145c5d1b39
5
5
  SHA512:
6
- metadata.gz: c05e5b47fcdf1cbd444a1d13efbfb2dd8a5ba18ef293f10b4434a26aeddbf5e3b65fe379843c069869b491bc9321b10cba9f1d64f14bc8c9af4481b983923d02
7
- data.tar.gz: 01a41eae9774e74a9104d06fbf4629c1fa8820d23873cf048ae1921264c90e669e319e4cbe86d16f3941ebc51aa415ee5c982a2e926b0cf3dfdec1fb6b9108a8
6
+ metadata.gz: b1a141005e644cf21ae5b62fcf1998528ef8694e5e32d0242802761a9519e21e2bd862ac606234dc03fb43ba149844e33be066f30939641286b5813ddced2590
7
+ data.tar.gz: b3d481b65dfdd56aa7d24f89f979adc8629885e35f5fd4180a5cddf45663766eea2ff8f6e950c09d31573e8cab55a5b567898a31e6d252ef3e18c10a52f2de04
@@ -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)
@@ -193,7 +193,7 @@ methods:
193
193
  if year < 2006
194
194
  nil
195
195
  else
196
- Date.civil(year, 3, Date.calculate_mday(year, 3, :second, :monday))
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, Date.calculate_mday(year, 5, :third, :monday))
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: |
@@ -79,7 +79,7 @@ methods:
79
79
  end
80
80
  day_after_thanksgiving: |
81
81
  def self.day_after_thanksgiving(year)
82
- Date.calculate_mday(year, 11, 4, 4) + 1
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, Date.calculate_mday(year, 3, :second, :monday))
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, Date.calculate_mday(year, 5, :third, :monday))
120
+ Date.civil(year, 5, Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 5, :third, :monday))
121
121
  end
122
122
  end
123
123
 
@@ -31,7 +31,7 @@ module Holidays
31
31
  end
32
32
 
33
33
  def self.day_after_thanksgiving(year)
34
- Date.calculate_mday(year, 11, 4, 4) + 1
34
+ Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 11, 4, 4) + 1
35
35
  end
36
36
 
37
37
 
@@ -117,7 +117,7 @@ end
117
117
 
118
118
 
119
119
  def self.day_after_thanksgiving(year)
120
- Date.calculate_mday(year, 11, 4, 4) + 1
120
+ Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 11, 4, 4) + 1
121
121
  end
122
122
 
123
123
 
@@ -31,7 +31,7 @@ module Holidays
31
31
  end
32
32
 
33
33
  def self.day_after_thanksgiving(year)
34
- Date.calculate_mday(year, 11, 4, 4) + 1
34
+ Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 11, 4, 4) + 1
35
35
  end
36
36
 
37
37
 
@@ -53,7 +53,7 @@ end
53
53
 
54
54
 
55
55
  def self.day_after_thanksgiving(year)
56
- Date.calculate_mday(year, 11, 4, 4) + 1
56
+ Holidays::DateCalculatorFactory.day_of_month_calculator.call(year, 11, 4, 4) + 1
57
57
  end
58
58
 
59
59
 
@@ -15,15 +15,15 @@ module Holidays
15
15
  #
16
16
  # ===== Examples
17
17
  # First Monday of January, 2008:
18
- # Date.calculate_mday(2008, 1, :first, :monday)
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
- # Date.calculate_mday(2008, 12, :third, :thursday)
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
- # Date.calculate_mday(2008, 1, :last, 1)
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
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '3.1.1'
2
+ VERSION = '3.1.2'
3
3
  end
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.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: 2015-12-22 00:00:00.000000000 Z
12
+ date: 2016-01-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler