holidays 8.2.0 → 8.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 26ed11c6f2462ac549c33067daacbb82781324b4c1637ea796c88048bc72faed
4
- data.tar.gz: d10b5f27dc975dc3a21739cc0c3e0299de4064eb6be5389a6f3a865dd2c78f9c
3
+ metadata.gz: c3ba6b994d34997a6450b7de76336b7ca5932a1d95d324b6a616e0a6398276ab
4
+ data.tar.gz: 85633e502dad7e5e572476b2c2a1cdb8f771ad08d3f0428602aa614635a99ccf
5
5
  SHA512:
6
- metadata.gz: 0e4089d0da9c918ee765b2674bf9399ce28abff83f7e50ab4b308169fd1c602b691c7b71a3fe63e70fe9d280f6c400cc0aa6b1298a08e9339288e17af7b790ec
7
- data.tar.gz: f7908de1a81251eedf4d91be236fd7fb62c2267e728df0a8ebee1c38f8441d378476ca401edde77bae29a80d6a72217cf6f0441afd66ed5d8d151e6ae00fc8ba
6
+ metadata.gz: 44a9dbfa4c0bed8e5ea3728d96d834eb77d933ad4da064a9a1423ac7b25cb9cd4ca348575b5660f45cd53adbe309af4906d8a85132752e7e4cfee20d7996e1c7
7
+ data.tar.gz: 336b8fbf1f179ea9b831f236905fa7bc28b6e217609edce8a27549cb27d612719bf3eafb5c513be77d0cc63fde80a50807cfe5d942a2456a4ae31249faa03eb1
@@ -1,5 +1,11 @@
1
1
  # Ruby Holidays Gem CHANGELOG
2
2
 
3
+ ## 8.3.0
4
+
5
+ * Update submodule definitions.
6
+ * Remove test about feb 29 on non leap year.
7
+ * Thanks to contributors!!
8
+
3
9
  ## 8.2.0
4
10
 
5
11
  * Update submodule definitions. Thanks to contributors!!
@@ -50,7 +50,7 @@ module Holidays
50
50
  {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
51
51
  {:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
52
52
  {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
53
- {:wday => 1, :week => 1, :name => "Terry Fox Day", :regions => [:ca_mb]},
53
+ {:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
54
54
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]}],
55
55
  9 => [{:wday => 1, :week => 1, :name => "Labour Day", :regions => [:ca]}],
56
56
  10 => [{:wday => 1, :week => 2, :name => "Thanksgiving", :regions => [:ca_ab, :ca_bc, :ca_mb, :ca_nt, :ca_nu, :ca_on, :ca_qc, :ca_sk, :ca_yt]},
@@ -32,7 +32,8 @@ module Holidays
32
32
  {:mday => 15, :name => "Mariä Himmelfahrt", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
33
33
  9 => [{:mday => 22, :name => "Mauritiustag", :regions => [:ch_ai]},
34
34
  {:mday => 25, :name => "Bruderklausenfest", :regions => [:ch_ow]}],
35
- 11 => [{:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
35
+ 11 => [{:function => "ch_be_zibelemaerit(year)", :function_arguments => [:year], :name => "Zibelemärit", :regions => [:ch_be]},
36
+ {:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]}],
36
37
  12 => [{:mday => 8, :name => "Maria Empfängnis", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_zg, :ch_fr, :ch_ai, :ch_ag, :ch_ti, :ch_vs]},
37
38
  {:mday => 25, :name => "Weihnachten", :regions => [:ch]},
38
39
  {:mday => 26, :name => "Stefanstag", :regions => [:ch_zh, :ch_be, :ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_bs, :ch_bl, :ch_sh, :ch_ar, :ch_ai, :ch_sg, :ch_gr, :ch_ag, :ch_tg, :ch_ti, :ch_vs, :ch_ne]},
@@ -76,6 +77,17 @@ end
76
77
  date
77
78
  },
78
79
 
80
+ "ch_be_zibelemaerit(year)" => Proc.new { |year|
81
+ date = Date.civil(year,11,1)
82
+ # Find the first Monday of November
83
+ until date.wday.eql? 1 do
84
+ date += 1
85
+ end
86
+ # There are 21 days between the first monday
87
+ # and the 4rth Monday after
88
+ date + 21
89
+ },
90
+
79
91
 
80
92
  }
81
93
  end
@@ -14,7 +14,8 @@ module Holidays
14
14
  {
15
15
  0 => [{:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]},
16
16
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
17
- {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]}],
17
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
18
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lunes de Pascua Granada", :regions => [:es_ct]}],
18
19
  1 => [{:mday => 1, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Año Nuevo", :regions => [:es]},
19
20
  {:mday => 6, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Reyes", :regions => [:es]}],
20
21
  2 => [{:mday => 28, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Andalucía", :regions => [:es_an]}],
@@ -64,6 +64,7 @@ module Holidays
64
64
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -3, :name => "Jueves Santo", :regions => [:es_pv, :es_na, :es_an, :es_ib, :es_cm, :es_mu, :es_m, :es_ar, :es_cl, :es_cn, :es_lo, :es_ga, :es_ce, :es_o, :es_ex]},
65
65
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Viernes Santo", :regions => [:es]},
66
66
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lunes de Pascua", :regions => [:es_pv, :es_ct, :es_na, :es_v, :es_vc]},
67
+ {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 50, :name => "Lunes de Pascua Granada", :regions => [:es_ct]},
67
68
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => -2, :name => "Vendredi saint", :regions => [:fr_a, :fr_m]},
68
69
  {:function => "easter(year)", :function_arguments => [:year], :type => :informal, :name => "Pâques", :regions => [:fr]},
69
70
  {:function => "easter(year)", :function_arguments => [:year], :function_modifier => 1, :name => "Lundi de Pâques", :regions => [:fr]},
@@ -299,7 +300,7 @@ module Holidays
299
300
  {:mday => 28, :name => "Επέτειος του Όχι", :regions => [:el]},
300
301
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de Valencia", :regions => [:es_vc, :es_v]},
301
302
  {:mday => 12, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de la Hispanidad", :regions => [:es]},
302
- {:mday => 8, :year_ranges => { :until => 2020 },:name => "Dan neovisnosti", :regions => [:hr]},
303
+ {:mday => 8, :year_ranges => { :until => 2019 },:name => "Dan neovisnosti", :regions => [:hr]},
303
304
  {:mday => 23, :name => "1956-os forradalom és szabadságharc ünnepe", :regions => [:hu]},
304
305
  {:wday => 1, :week => -1, :name => "October Bank Holiday", :regions => [:ie]},
305
306
  {:mday => 14, :type => :informal, :name => "Dzień Nauczyciela (Dzień Edukacji Narodowej)", :regions => [:pl]},
@@ -311,6 +312,7 @@ module Holidays
311
312
  {:mday => 11, :name => "Armistice 1918", :regions => [:be_fr]},
312
313
  {:mday => 1, :name => "Allerheiligen", :regions => [:be_nl]},
313
314
  {:mday => 11, :name => "Wapenstilstand 1918", :regions => [:be_nl]},
315
+ {:function => "ch_be_zibelemaerit(year)", :function_arguments => [:year], :name => "Zibelemärit", :regions => [:ch_be]},
314
316
  {:mday => 1, :name => "Allerheiligen", :regions => [:ch_lu, :ch_ur, :ch_sz, :ch_ow, :ch_nw, :ch_gl, :ch_zg, :ch_fr, :ch_so, :ch_ai, :ch_sg, :ch_ag, :ch_ti, :ch_vs, :ch_ju]},
315
317
  {:mday => 17, :name => "Den boje za svobodu a demokracii", :regions => [:cz]},
316
318
  {:mday => 10, :type => :informal, :name => "Mortensaften", :regions => [:dk]},
@@ -436,7 +438,7 @@ module Holidays
436
438
  {:mday => 23, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Santiago Apostol", :regions => [:es_ga]},
437
439
  {:mday => 14, :name => "Fête nationale", :regions => [:fr]},
438
440
  {:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
439
- {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]},
441
+ {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]},
440
442
  {:mday => 6, :name => "Valstybės diena", :regions => [:lt]},
441
443
  {:mday => 5, :name => "Sviatok svätého Cyrila a svätého Metoda", :regions => [:sk]},
442
444
  {:mday => 16, :year_ranges => { :limited => [1991] },:name => "День Незалежності України", :regions => [:ua]}],
@@ -481,7 +483,7 @@ module Holidays
481
483
  {:mday => 9, :observed => "to_monday_if_sunday(date)", :observed_arguments => [:date], :name => "Día de La Rioja", :regions => [:es_lo]},
482
484
  {:mday => 24, :name => "San Juan", :regions => [:es_ct, :es_vc]},
483
485
  {:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
484
- {:mday => 25, :year_ranges => { :until => 2020 },:name => "Dan državnosti", :regions => [:hr]},
486
+ {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]},
485
487
  {:wday => 1, :week => 1, :name => "June Bank Holiday", :regions => [:ie]},
486
488
  {:mday => 3, :type => :informal, :name => "Sjómannadagurinn", :regions => [:is]},
487
489
  {:mday => 17, :name => "Lýðveldisdagurinn", :regions => [:is]},
@@ -563,6 +565,17 @@ end
563
565
  date
564
566
  },
565
567
 
568
+ "ch_be_zibelemaerit(year)" => Proc.new { |year|
569
+ date = Date.civil(year,11,1)
570
+ # Find the first Monday of November
571
+ until date.wday.eql? 1 do
572
+ date += 1
573
+ end
574
+ # There are 21 days between the first monday
575
+ # and the 4rth Monday after
576
+ date + 21
577
+ },
578
+
566
579
  "de_buss_und_bettag(year)" => Proc.new { |year|
567
580
  date = Date.civil(year,11,23)
568
581
  if date.wday > 3
@@ -25,7 +25,7 @@ module Holidays
25
25
  {:mday => 9, :name => "Liberation Day", :regions => [:je, :gb_jsy, :gg, :gb_gsy]},
26
26
  {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb]}],
27
27
  7 => [{:mday => 5, :name => "Tynwald Day", :regions => [:im, :gb_iom]},
28
- {:mday => 12, :name => "Battle of the Boyne", :regions => [:gb_nir]}],
28
+ {:mday => 12, :observed => "to_monday_if_weekend(date)", :observed_arguments => [:date], :name => "Battle of the Boyne", :regions => [:gb_nir]}],
29
29
  8 => [{:wday => 1, :week => 1, :name => "Bank Holiday", :regions => [:gb_sct]},
30
30
  {:wday => 1, :week => -1, :name => "Bank Holiday", :regions => [:gb_eng, :gb_wls, :gb_eaw, :gb_nir, :je, :gb_jsy, :gg, :gb_gsy]}],
31
31
  11 => [{:mday => 5, :type => :informal, :name => "Guy Fawkes Day", :regions => [:gb]},
@@ -20,10 +20,10 @@ module Holidays
20
20
  5 => [{:mday => 1, :name => "Praznik rada", :regions => [:hr]},
21
21
  {:mday => 30, :year_ranges => { :from => 2020 },:name => "Dan državnosti", :regions => [:hr]}],
22
22
  6 => [{:mday => 22, :name => "Dan antifašističke borbe", :regions => [:hr]},
23
- {:mday => 25, :year_ranges => { :until => 2020 },:name => "Dan državnosti", :regions => [:hr]}],
23
+ {:mday => 25, :year_ranges => { :until => 2019 },:name => "Dan državnosti", :regions => [:hr]}],
24
24
  8 => [{:mday => 5, :name => "Dan pobjede i domovinske zahvalnosti i Dan hrvatskih branitelja", :regions => [:hr]},
25
25
  {:mday => 15, :name => "Velika Gospa", :regions => [:hr]}],
26
- 10 => [{:mday => 8, :year_ranges => { :until => 2020 },:name => "Dan neovisnosti", :regions => [:hr]}],
26
+ 10 => [{:mday => 8, :year_ranges => { :until => 2019 },:name => "Dan neovisnosti", :regions => [:hr]}],
27
27
  11 => [{:mday => 1, :name => "Svi sveti", :regions => [:hr]},
28
28
  {:mday => 18, :year_ranges => { :from => 2020 },:name => "Dan sjećanja na žrtve Domovinskog rata i Dan sjećanja na žrtvu Vukovara i Škabrnje", :regions => [:hr]}],
29
29
  12 => [{:mday => 25, :name => "Božić", :regions => [:hr]},
@@ -91,7 +91,7 @@ module Holidays
91
91
  {:wday => 1, :week => 1, :name => "Civic Holiday", :regions => [:ca_nt, :ca_nu]},
92
92
  {:wday => 1, :week => 1, :type => :informal, :name => "Civic Holiday", :regions => [:ca_on, :ca_pe]},
93
93
  {:wday => 1, :week => 1, :name => "New Brunswick Day", :regions => [:ca_nb]},
94
- {:wday => 1, :week => 1, :name => "Terry Fox Day", :regions => [:ca_mb]},
94
+ {:wday => 1, :week => 1, :type => :informal, :name => "Terry Fox Day", :regions => [:ca_mb]},
95
95
  {:wday => 1, :week => 3, :name => "Discovery Day", :regions => [:ca_yt]},
96
96
  {:wday => 1, :week => 2, :name => "Victory Day", :regions => [:us_ri]},
97
97
  {:mday => 16, :observed => "to_weekday_if_weekend(date)", :observed_arguments => [:date], :name => "Bennington Battle Day", :regions => [:us_vt]},
@@ -1,3 +1,3 @@
1
1
  module Holidays
2
- VERSION = '8.2.0'
2
+ VERSION = '8.3.0'
3
3
  end
@@ -232,13 +232,15 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
232
232
 
233
233
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
234
234
 
235
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb])[0] || {})[:name]
235
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
236
236
 
237
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
237
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
238
238
 
239
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb])[0] || {})[:name]
239
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
240
240
 
241
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb])[0] || {})[:name]
241
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
242
+
243
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
242
244
 
243
245
  assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
244
246
 
@@ -43,5 +43,9 @@ class ChDefinitionTests < Test::Unit::TestCase # :nodoc:
43
43
 
44
44
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
45
45
 
46
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
47
+
48
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
49
+
46
50
  end
47
51
  end
@@ -131,5 +131,7 @@ class EsDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
133
133
 
134
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
135
+
134
136
  end
135
137
  end
@@ -131,6 +131,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
131
131
 
132
132
  assert_equal "Näfelser Fahrt", (Holidays.on(Date.civil(2014, 4, 3), [:ch_gl])[0] || {})[:name]
133
133
 
134
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2014, 11, 24), [:ch_be])[0] || {})[:name]
135
+
136
+ assert_equal "Zibelemärit", (Holidays.on(Date.civil(2020, 11, 23), [:ch_be])[0] || {})[:name]
137
+
134
138
  assert_equal "Den obnovy samostatného českého státu", (Holidays.on(Date.civil(2010, 1, 1), [:cz], [:informal])[0] || {})[:name]
135
139
 
136
140
  assert_equal "Velký pátek", (Holidays.on(Date.civil(2016, 3, 25), [:cz], [:informal])[0] || {})[:name]
@@ -417,6 +421,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
417
421
 
418
422
  assert_equal "Fiesta Nacional de Cataluña", (Holidays.on(Date.civil(2009, 9, 11), [:es_ct])[0] || {})[:name]
419
423
 
424
+ assert_equal "Lunes de Pascua Granada", (Holidays.on(Date.civil(2020, 6, 1), [:es_ct])[0] || {})[:name]
425
+
420
426
  assert_equal "Jour de l'an", (Holidays.on(Date.civil(2007, 1, 1), [:fr])[0] || {})[:name]
421
427
 
422
428
  assert_equal "Lundi de Pâques", (Holidays.on(Date.civil(2007, 4, 9), [:fr])[0] || {})[:name]
@@ -473,6 +479,22 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
473
479
 
474
480
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
475
481
 
482
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
483
+
484
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
485
+
486
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
487
+
488
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
489
+
490
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
491
+
492
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
493
+
494
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
495
+
496
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
497
+
476
498
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
477
499
 
478
500
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -31,6 +31,22 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_equal "St. Patrick's Day", (Holidays.on(Date.civil(2019, 3, 18), [:gb_nir], [:observed, :informal])[0] || {})[:name]
33
33
 
34
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir])[0] || {})[:name]
35
+
36
+ assert_nil (Holidays.on(Date.civil(2020, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
37
+
38
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2020, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
39
+
40
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 12), [:gb_nir])[0] || {})[:name]
41
+
42
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2008, 7, 14), [:gb_nir], [:observed])[0] || {})[:name]
43
+
44
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir])[0] || {})[:name]
45
+
46
+ assert_equal "Battle of the Boyne", (Holidays.on(Date.civil(2021, 7, 12), [:gb_nir], [:observed])[0] || {})[:name]
47
+
48
+ assert_nil (Holidays.on(Date.civil(2021, 7, 13), [:gb_nir], [:observed])[0] || {})[:name]
49
+
34
50
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal])[0] || {})[:name]
35
51
 
36
52
  assert_equal "St. Andrew's Day", (Holidays.on(Date.civil(2006, 11, 30), [:gb_sct], [:informal, :observed])[0] || {})[:name]
@@ -232,13 +232,15 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
232
232
 
233
233
  assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
234
234
 
235
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb])[0] || {})[:name]
235
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
236
236
 
237
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
237
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
238
238
 
239
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb])[0] || {})[:name]
239
+ assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
240
240
 
241
- assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb])[0] || {})[:name]
241
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
242
+
243
+ assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
242
244
 
243
245
  assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
244
246
 
@@ -142,28 +142,6 @@ class HolidaysTests < Test::Unit::TestCase
142
142
  assert_empty holidays
143
143
  end
144
144
 
145
- def test_year_holidays_feb_29_on_non_leap_year
146
- assert_raises ArgumentError do
147
- Holidays.year_holidays([:ca_on], Date.civil(2015, 2, 29))
148
- end
149
-
150
- assert_raises ArgumentError do
151
- Holidays.year_holidays([:ca_on], Date.civil(2019, 2, 29))
152
- end
153
-
154
- assert_raises ArgumentError do
155
- Holidays.year_holidays([:ca_on], Date.civil(2021, 2, 29))
156
- end
157
-
158
- assert_raises ArgumentError do
159
- Holidays.year_holidays([:us], Date.civil(2023, 2, 29))
160
- end
161
-
162
- assert_raises ArgumentError do
163
- Holidays.year_holidays([:ca_on], Date.civil(2025, 2, 29))
164
- end
165
- end
166
-
167
145
  def test_year_holidays_random_years
168
146
  # Should be 1 less holiday, as Family day didn't exist in Ontario in 1990
169
147
  holidays = Holidays.year_holidays([:ca_on], Date.civil(1990, 1, 1))
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: 8.2.0
4
+ version: 8.3.0
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: 2020-04-28 00:00:00.000000000 Z
12
+ date: 2020-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -392,7 +392,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
392
392
  - !ruby/object:Gem::Version
393
393
  version: '0'
394
394
  requirements: []
395
- rubygems_version: 3.0.3
395
+ rubygems_version: 3.1.2
396
396
  signing_key:
397
397
  specification_version: 4
398
398
  summary: A collection of Ruby methods to deal with statutory and other holidays.