holidays 8.6.0 → 8.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +25 -0
  3. data/CHANGELOG.md +19 -4
  4. data/README.md +70 -55
  5. data/holidays.gemspec +5 -0
  6. data/lib/generated_definitions/MANIFEST +2 -0
  7. data/lib/generated_definitions/REGIONS.rb +2 -2
  8. data/lib/generated_definitions/au.rb +35 -5
  9. data/lib/generated_definitions/br.rb +2 -1
  10. data/lib/generated_definitions/ca.rb +2 -1
  11. data/lib/generated_definitions/de.rb +6 -3
  12. data/lib/generated_definitions/dk.rb +1 -1
  13. data/lib/generated_definitions/europe.rb +26 -20
  14. data/lib/generated_definitions/fr.rb +2 -2
  15. data/lib/generated_definitions/gb.rb +1 -0
  16. data/lib/generated_definitions/gr.rb +38 -0
  17. data/lib/generated_definitions/ke.rb +34 -0
  18. data/lib/generated_definitions/lt.rb +2 -1
  19. data/lib/generated_definitions/lv.rb +2 -1
  20. data/lib/generated_definitions/northamerica.rb +2 -1
  21. data/lib/generated_definitions/nz.rb +2 -1
  22. data/lib/generated_definitions/scandinavia.rb +1 -1
  23. data/lib/generated_definitions/southamerica.rb +1 -0
  24. data/lib/holidays/finder/context/search.rb +1 -0
  25. data/lib/holidays/version.rb +1 -1
  26. data/test/defs/test_defs_au.rb +15 -0
  27. data/test/defs/test_defs_br.rb +4 -0
  28. data/test/defs/test_defs_ca.rb +10 -2
  29. data/test/defs/test_defs_de.rb +4 -0
  30. data/test/defs/test_defs_dk.rb +4 -0
  31. data/test/defs/test_defs_europe.rb +53 -33
  32. data/test/defs/test_defs_fr.rb +3 -3
  33. data/test/defs/test_defs_gb.rb +8 -0
  34. data/test/defs/{test_defs_el.rb → test_defs_gr.rb} +18 -18
  35. data/test/defs/test_defs_ke.rb +31 -0
  36. data/test/defs/test_defs_lt.rb +2 -0
  37. data/test/defs/test_defs_lv.rb +2 -0
  38. data/test/defs/test_defs_northamerica.rb +10 -2
  39. data/test/defs/test_defs_nz.rb +4 -0
  40. data/test/defs/test_defs_scandinavia.rb +4 -0
  41. data/test/defs/test_defs_southamerica.rb +4 -0
  42. data/test/integration/test_available_regions.rb +1 -1
  43. data/test/integration/test_holidays.rb +2 -8
  44. metadata +14 -6
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
3
 
4
4
  # This file is generated by the Ruby Holiday gem.
5
5
  #
6
- # Definitions loaded: definitions/at.yaml, definitions/be_fr.yaml, definitions/be_nl.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/el.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/lv.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml, definitions/bg.yaml, definitions/ua.yaml
6
+ # Definitions loaded: definitions/at.yaml, definitions/be_fr.yaml, definitions/be_nl.yaml, definitions/ch.yaml, definitions/cz.yaml, definitions/dk.yaml, definitions/de.yaml, definitions/es.yaml, definitions/fr.yaml, definitions/gb.yaml, definitions/gr.yaml, definitions/hr.yaml, definitions/hu.yaml, definitions/ie.yaml, definitions/is.yaml, definitions/it.yaml, definitions/li.yaml, definitions/lt.yaml, definitions/lv.yaml, definitions/nl.yaml, definitions/no.yaml, definitions/pl.yaml, definitions/pt.yaml, definitions/ro.yaml, definitions/sk.yaml, definitions/si.yaml, definitions/bg.yaml, definitions/ua.yaml
7
7
  class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_europe
@@ -161,6 +161,10 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
161
161
 
162
162
  assert_equal "2. svátek vánoční", (Holidays.on(Date.civil(2010, 12, 26), [:cz], [:informal])[0] || {})[:name]
163
163
 
164
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
165
+
166
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
167
+
164
168
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
165
169
 
166
170
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -265,37 +269,11 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
265
269
 
266
270
  assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2019, 3, 8), [:de_be])[0] || {})[:name]
267
271
 
268
- assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
269
-
270
- assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
271
-
272
- assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:el], [:informal])[0] || {})[:name]
273
-
274
- assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:el], [:informal])[0] || {})[:name]
275
-
276
- assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:el], [:informal])[0] || {})[:name]
277
-
278
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:el], [:informal])[0] || {})[:name]
279
-
280
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:el], [:informal])[0] || {})[:name]
281
-
282
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:el], [:informal])[0] || {})[:name]
272
+ assert_equal "Internationaler Frauentag", (Holidays.on(Date.civil(2023, 3, 8), [:de_mv])[0] || {})[:name]
283
273
 
284
- assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:el], [:informal])[0] || {})[:name]
285
-
286
- assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:el], [:informal])[0] || {})[:name]
287
-
288
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:el], [:informal])[0] || {})[:name]
289
-
290
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:el], [:informal])[0] || {})[:name]
291
-
292
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:el], [:informal])[0] || {})[:name]
293
-
294
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:el], [:informal])[0] || {})[:name]
295
-
296
- assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:el], [:informal])[0] || {})[:name]
274
+ assert_equal "Tag der Befreiung", (Holidays.on(Date.civil(2020, 5, 8), [:de_be])[0] || {})[:name]
297
275
 
298
- assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:el], [:informal])[0] || {})[:name]
276
+ assert_equal "Weltkindertag", (Holidays.on(Date.civil(2024, 9, 20), [:de_th])[0] || {})[:name]
299
277
 
300
278
  assert_equal "Año Nuevo", (Holidays.on(Date.civil(2009, 1, 1), [:es], [:informal])[0] || {})[:name]
301
279
 
@@ -433,7 +411,7 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
433
411
 
434
412
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
435
413
 
436
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
414
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
437
415
 
438
416
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
439
417
 
@@ -447,11 +425,11 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
447
425
 
448
426
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
449
427
 
450
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
428
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
451
429
 
452
430
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
453
431
 
454
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
432
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
455
433
 
456
434
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
457
435
 
@@ -593,8 +571,46 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
593
571
 
594
572
  assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
595
573
 
574
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
575
+
576
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
577
+
578
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
579
+
596
580
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
597
581
 
582
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
583
+
584
+ assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:gr], [:informal])[0] || {})[:name]
585
+
586
+ assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:gr], [:informal])[0] || {})[:name]
587
+
588
+ assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:gr], [:informal])[0] || {})[:name]
589
+
590
+ assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:gr], [:informal])[0] || {})[:name]
591
+
592
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:gr], [:informal])[0] || {})[:name]
593
+
594
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:gr], [:informal])[0] || {})[:name]
595
+
596
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:gr], [:informal])[0] || {})[:name]
597
+
598
+ assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:gr], [:informal])[0] || {})[:name]
599
+
600
+ assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:gr], [:informal])[0] || {})[:name]
601
+
602
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:gr], [:informal])[0] || {})[:name]
603
+
604
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:gr], [:informal])[0] || {})[:name]
605
+
606
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:gr], [:informal])[0] || {})[:name]
607
+
608
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:gr], [:informal])[0] || {})[:name]
609
+
610
+ assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:gr], [:informal])[0] || {})[:name]
611
+
612
+ assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:gr], [:informal])[0] || {})[:name]
613
+
598
614
  assert_equal "Nova godina", (Holidays.on(Date.civil(2012, 1, 1), [:hr], [:informal])[0] || {})[:name]
599
615
 
600
616
  assert_equal "Bogojavljenje ili Sveta tri kralja", (Holidays.on(Date.civil(2012, 1, 6), [:hr], [:informal])[0] || {})[:name]
@@ -867,6 +883,8 @@ class EuropeDefinitionTests < Test::Unit::TestCase # :nodoc:
867
883
 
868
884
  assert_equal "Antroji Kalėdų diena", (Holidays.on(Date.civil(2012, 12, 26), [:lt])[0] || {})[:name]
869
885
 
886
+ assert_equal "Mirusiųjų atminimo (Vėlinių) diena", (Holidays.on(Date.civil(2024, 11, 2), [:lt])[0] || {})[:name]
887
+
870
888
  assert_equal "Jaungada diena", (Holidays.on(Date.civil(2018, 1, 1), [:lv])[0] || {})[:name]
871
889
  assert_equal "Jaungada diena", (Holidays.on(Date.civil(2019, 1, 1), [:lv])[0] || {})[:name]
872
890
  assert_equal "Jaungada diena", (Holidays.on(Date.civil(2029, 1, 1), [:lv])[0] || {})[:name]
@@ -899,6 +917,8 @@ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.o
899
917
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
900
918
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
901
919
 
920
+ assert_equal "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", (Holidays.on(Date.civil(2023, 5, 29), [:lv])[0] || {})[:name]
921
+
902
922
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
903
923
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
904
924
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
@@ -17,7 +17,7 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
17
17
 
18
18
  assert_equal "Ascension", (Holidays.on(Date.civil(2007, 5, 17), [:fr])[0] || {})[:name]
19
19
 
20
- assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
20
+ assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
21
21
 
22
22
  assert_equal "Fête nationale", (Holidays.on(Date.civil(2007, 7, 14), [:fr])[0] || {})[:name]
23
23
 
@@ -31,11 +31,11 @@ class FrDefinitionTests < Test::Unit::TestCase # :nodoc:
31
31
 
32
32
  assert_nil (Holidays.on(Date.civil(2007, 4, 8), [:fr])[0] || {})[:name]
33
33
 
34
- assert_nil (Holidays.on(Date.civil(2007, 5, 27), [:fr])[0] || {})[:name]
34
+ assert_nil (Holidays.on(Date.civil(2007, 5, 28), [:fr])[0] || {})[:name]
35
35
 
36
36
  assert_equal "Pâques", (Holidays.on(Date.civil(2007, 4, 8), [:fr], [:informal])[0] || {})[:name]
37
37
 
38
- assert_equal "Pentecôte", (Holidays.on(Date.civil(2007, 5, 27), [:fr], [:informal])[0] || {})[:name]
38
+ assert_equal "Lundi de Pentecôte", (Holidays.on(Date.civil(2007, 5, 28), [:fr], [:informal])[0] || {})[:name]
39
39
 
40
40
  assert_equal "Saint-Étienne", (Holidays.on(Date.civil(2017, 12, 26), [:fr_a, :fr_m], [:informal])[0] || {})[:name]
41
41
 
@@ -145,7 +145,15 @@ class GbDefinitionTests < Test::Unit::TestCase # :nodoc:
145
145
 
146
146
  assert_nil (Holidays.on(Date.civil(2021, 9, 19), [:gb])[0] || {})[:name]
147
147
 
148
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
149
+
150
+ assert_nil (Holidays.on(Date.civil(2024, 5, 8), [:gb])[0] || {})[:name]
151
+
152
+ assert_nil (Holidays.on(Date.civil(2022, 5, 8), [:gb])[0] || {})[:name]
153
+
148
154
  assert_equal "Bank Holiday", (Holidays.on(Date.civil(2023, 5, 29), [:gb])[0] || {})[:name]
149
155
 
156
+ assert_equal "Bank Holiday for the Coronation of King Charles III", (Holidays.on(Date.civil(2023, 5, 8), [:gb])[0] || {})[:name]
157
+
150
158
  end
151
159
  end
@@ -3,39 +3,39 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
3
 
4
4
  # This file is generated by the Ruby Holiday gem.
5
5
  #
6
- # Definitions loaded: definitions/el.yaml
7
- class ElDefinitionTests < Test::Unit::TestCase # :nodoc:
6
+ # Definitions loaded: definitions/gr.yaml
7
+ class GrDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
- def test_el
10
- assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:el], [:informal])[0] || {})[:name]
9
+ def test_gr
10
+ assert_equal "Πρωτοχρονιά", (Holidays.on(Date.civil(2011, 1, 1), [:gr], [:informal])[0] || {})[:name]
11
11
 
12
- assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:el], [:informal])[0] || {})[:name]
12
+ assert_equal "Θεοφάνεια", (Holidays.on(Date.civil(2011, 1, 6), [:gr], [:informal])[0] || {})[:name]
13
13
 
14
- assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:el], [:informal])[0] || {})[:name]
14
+ assert_equal "Μεγάλη Παρασκευή", (Holidays.on(Date.civil(2011, 4, 22), [:gr], [:informal])[0] || {})[:name]
15
15
 
16
- assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:el], [:informal])[0] || {})[:name]
16
+ assert_equal "Μεγάλο Σάββατο", (Holidays.on(Date.civil(1970, 4, 25), [:gr], [:informal])[0] || {})[:name]
17
17
 
18
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:el], [:informal])[0] || {})[:name]
18
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(1985, 4, 14), [:gr], [:informal])[0] || {})[:name]
19
19
 
20
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:el], [:informal])[0] || {})[:name]
20
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2011, 4, 24), [:gr], [:informal])[0] || {})[:name]
21
21
 
22
- assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:el], [:informal])[0] || {})[:name]
22
+ assert_equal "Κυριακή του Πάσχα", (Holidays.on(Date.civil(2027, 5, 2), [:gr], [:informal])[0] || {})[:name]
23
23
 
24
- assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:el], [:informal])[0] || {})[:name]
24
+ assert_equal "Δευτέρα του Πάσχα", (Holidays.on(Date.civil(2046, 4, 30), [:gr], [:informal])[0] || {})[:name]
25
25
 
26
- assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:el], [:informal])[0] || {})[:name]
26
+ assert_equal "Πρωτομαγιά", (Holidays.on(Date.civil(2011, 5, 1), [:gr], [:informal])[0] || {})[:name]
27
27
 
28
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:el], [:informal])[0] || {})[:name]
28
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2011, 6, 13), [:gr], [:informal])[0] || {})[:name]
29
29
 
30
- assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:el], [:informal])[0] || {})[:name]
30
+ assert_equal "Αγίου Πνεύματος", (Holidays.on(Date.civil(2012, 6, 4), [:gr], [:informal])[0] || {})[:name]
31
31
 
32
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:el], [:informal])[0] || {})[:name]
32
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2011, 3, 7), [:gr], [:informal])[0] || {})[:name]
33
33
 
34
- assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:el], [:informal])[0] || {})[:name]
34
+ assert_equal "Καθαρά Δευτέρα", (Holidays.on(Date.civil(2012, 2, 27), [:gr], [:informal])[0] || {})[:name]
35
35
 
36
- assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:el], [:informal])[0] || {})[:name]
36
+ assert_equal "Χριστούγεννα", (Holidays.on(Date.civil(2011, 12, 25), [:gr], [:informal])[0] || {})[:name]
37
37
 
38
- assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:el], [:informal])[0] || {})[:name]
38
+ assert_equal "Δεύτερη ημέρα των Χριστουγέννων", (Holidays.on(Date.civil(2011, 12, 26), [:gr], [:informal])[0] || {})[:name]
39
39
 
40
40
  end
41
41
  end
@@ -0,0 +1,31 @@
1
+ # encoding: utf-8
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
3
+
4
+ # This file is generated by the Ruby Holiday gem.
5
+ #
6
+ # Definitions loaded: definitions/ke.yaml
7
+ class KeDefinitionTests < Test::Unit::TestCase # :nodoc:
8
+
9
+ def test_ke
10
+ assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:ke])[0] || {})[:name]
11
+
12
+ assert_equal "Easter Monday", (Holidays.on(Date.civil(2008, 3, 24), [:ke])[0] || {})[:name]
13
+
14
+ assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ke])[0] || {})[:name]
15
+
16
+ assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 5, 1), [:ke])[0] || {})[:name]
17
+
18
+ assert_equal "Madaraka Day", (Holidays.on(Date.civil(2019, 6, 1), [:ke])[0] || {})[:name]
19
+
20
+ assert_equal "Huduma Day", (Holidays.on(Date.civil(2018, 10, 10), [:ke])[0] || {})[:name]
21
+
22
+ assert_equal "Mashujaa Day", (Holidays.on(Date.civil(2018, 10, 20), [:ke])[0] || {})[:name]
23
+
24
+ assert_equal "Jamhuri Day", (Holidays.on(Date.civil(2019, 12, 12), [:ke])[0] || {})[:name]
25
+
26
+ assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ke])[0] || {})[:name]
27
+
28
+ assert_equal "Utamaduni Day", (Holidays.on(Date.civil(2018, 12, 26), [:ke])[0] || {})[:name]
29
+
30
+ end
31
+ end
@@ -59,5 +59,7 @@ class LtDefinitionTests < Test::Unit::TestCase # :nodoc:
59
59
 
60
60
  assert_equal "Antroji Kalėdų diena", (Holidays.on(Date.civil(2012, 12, 26), [:lt])[0] || {})[:name]
61
61
 
62
+ assert_equal "Mirusiųjų atminimo (Vėlinių) diena", (Holidays.on(Date.civil(2024, 11, 2), [:lt])[0] || {})[:name]
63
+
62
64
  end
63
65
  end
@@ -39,6 +39,8 @@ assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.o
39
39
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
40
40
  assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
41
41
 
42
+ assert_equal "Diena, kad Latvijas hokeja komanda ieguva bronzas medaļu 2023. gada Pasaules hokeja čempionātā", (Holidays.on(Date.civil(2023, 5, 29), [:lv])[0] || {})[:name]
43
+
42
44
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
43
45
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
44
46
  assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
@@ -201,9 +201,17 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
201
201
 
202
202
  assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
203
203
 
204
- assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca])[0] || {})[:name]
204
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt])[0] || {})[:name]
205
205
 
206
- assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca])[0] || {})[:name]
206
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2021, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal])[0] || {})[:name]
207
+
208
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
209
+
210
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2023, 10, 2), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
211
+
212
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_bc, :ca_nt, :ca_pe, :ca_yt], [:observed])[0] || {})[:name]
213
+
214
+ assert_equal "National Day for Truth and Reconciliation", (Holidays.on(Date.civil(2026, 9, 30), [:ca_ab, :ca_mb, :ca_nu], [:informal, :observed])[0] || {})[:name]
207
215
 
208
216
  assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
209
217
 
@@ -59,5 +59,9 @@ class NzDefinitionTests < Test::Unit::TestCase # :nodoc:
59
59
 
60
60
  assert_equal "Matariki", (Holidays.on(Date.civil(2052, 6, 21), [:nz])[0] || {})[:name]
61
61
 
62
+ assert_equal "Queen's Birthday", (Holidays.on(Date.civil(2022, 6, 6), [:nz])[0] || {})[:name]
63
+
64
+ assert_equal "King's Birthday", (Holidays.on(Date.civil(2023, 6, 5), [:nz])[0] || {})[:name]
65
+
62
66
  end
63
67
  end
@@ -7,6 +7,10 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
7
7
  class ScandinaviaDefinitionTests < Test::Unit::TestCase # :nodoc:
8
8
 
9
9
  def test_scandinavia
10
+ assert_equal "Store Bededag", (Holidays.on(Date.civil(2023, 5, 5), [:dk])[0] || {})[:name]
11
+
12
+ assert_nil (Holidays.on(Date.civil(2024, 4, 26), [:dk])[0] || {})[:name]
13
+
10
14
  assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
11
15
 
12
16
  assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
@@ -97,6 +97,10 @@ assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11,
97
97
 
98
98
  assert_equal "Proclamação da República", (Holidays.on(Date.civil(2008, 11, 15), [:br], [:informal])[0] || {})[:name]
99
99
 
100
+ assert_nil (Holidays.on(Date.civil(2023, 11, 20), [:br], [:informal])[0] || {})[:name]
101
+
102
+ assert_equal "Dia Nacional de Zumbi e da Consciência Negra", (Holidays.on(Date.civil(2024, 11, 20), [:br], [:informal])[0] || {})[:name]
103
+
100
104
  assert_equal "Natal", (Holidays.on(Date.civil(2008, 12, 25), [:br], [:informal])[0] || {})[:name]
101
105
 
102
106
  assert_equal "Año Nuevo", (Holidays.on(Date.civil(2014, 1, 1), [:cl], [:informal])[0] || {})[:name]
@@ -18,6 +18,6 @@ class AvailableRegionsTests < Test::Unit::TestCase
18
18
  # This test might fail if we add new regions. Since this is an integration test
19
19
  # I am fine with that!
20
20
  def test_available_regions_returns_correct_number_of_regions
21
- assert_equal 258, Holidays.available_regions.count
21
+ assert_equal 259, Holidays.available_regions.count
22
22
  end
23
23
  end
@@ -130,12 +130,6 @@ class HolidaysTests < Test::Unit::TestCase
130
130
  assert_equal 5, holidays.length
131
131
  end
132
132
 
133
- def test_year_holidays_without_specified_year
134
- # Gets holidays for current year from today's date
135
- holidays = Holidays.year_holidays([:de])
136
- assert_equal holidays.first[:date].year, Date.today.year
137
- end
138
-
139
133
  def test_year_holidays_empty
140
134
  # if remain holidays is nothing , method will return empty.
141
135
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2016, 12, 27))
@@ -155,7 +149,7 @@ class HolidaysTests < Test::Unit::TestCase
155
149
  assert_equal 11, holidays.length
156
150
 
157
151
  holidays = Holidays.year_holidays([:ca_on], Date.civil(2050, 1, 1))
158
- assert_equal 10, holidays.length
152
+ assert_equal 9, holidays.length
159
153
 
160
154
  holidays = Holidays.year_holidays([:jp], Date.civil(2070, 1, 1))
161
155
  assert_equal 19, holidays.length
@@ -244,6 +238,6 @@ class HolidaysTests < Test::Unit::TestCase
244
238
 
245
239
  def test_load_all
246
240
  Holidays.load_all
247
- assert_equal 258, Holidays.available_regions.count
241
+ assert_equal 259, Holidays.available_regions.count
248
242
  end
249
243
  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: 8.6.0
4
+ version: 8.8.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: 2022-09-15 00:00:00.000000000 Z
12
+ date: 2024-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -103,6 +103,7 @@ executables: []
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - ".github/workflows/ruby.yml"
106
107
  - ".gitmodules"
107
108
  - CHANGELOG.md
108
109
  - CODE_OF_CONDUCT.md
@@ -147,6 +148,7 @@ files:
147
148
  - lib/generated_definitions/fr.rb
148
149
  - lib/generated_definitions/gb.rb
149
150
  - lib/generated_definitions/ge.rb
151
+ - lib/generated_definitions/gr.rb
150
152
  - lib/generated_definitions/hk.rb
151
153
  - lib/generated_definitions/hr.rb
152
154
  - lib/generated_definitions/hu.rb
@@ -154,6 +156,7 @@ files:
154
156
  - lib/generated_definitions/is.rb
155
157
  - lib/generated_definitions/it.rb
156
158
  - lib/generated_definitions/jp.rb
159
+ - lib/generated_definitions/ke.rb
157
160
  - lib/generated_definitions/kr.rb
158
161
  - lib/generated_definitions/kz.rb
159
162
  - lib/generated_definitions/li.rb
@@ -267,7 +270,6 @@ files:
267
270
  - test/defs/test_defs_dk.rb
268
271
  - test/defs/test_defs_ecbtarget.rb
269
272
  - test/defs/test_defs_ee.rb
270
- - test/defs/test_defs_el.rb
271
273
  - test/defs/test_defs_es.rb
272
274
  - test/defs/test_defs_europe.rb
273
275
  - test/defs/test_defs_fed_ex.rb
@@ -278,6 +280,7 @@ files:
278
280
  - test/defs/test_defs_fr.rb
279
281
  - test/defs/test_defs_gb.rb
280
282
  - test/defs/test_defs_ge.rb
283
+ - test/defs/test_defs_gr.rb
281
284
  - test/defs/test_defs_hk.rb
282
285
  - test/defs/test_defs_hr.rb
283
286
  - test/defs/test_defs_hu.rb
@@ -285,6 +288,7 @@ files:
285
288
  - test/defs/test_defs_is.rb
286
289
  - test/defs/test_defs_it.rb
287
290
  - test/defs/test_defs_jp.rb
291
+ - test/defs/test_defs_ke.rb
288
292
  - test/defs/test_defs_kr.rb
289
293
  - test/defs/test_defs_kz.rb
290
294
  - test/defs/test_defs_li.rb
@@ -378,7 +382,10 @@ files:
378
382
  homepage: https://github.com/holidays/holidays
379
383
  licenses:
380
384
  - MIT
381
- metadata: {}
385
+ metadata:
386
+ changelog_uri: https://github.com/holidays/holidays/blob/master/CHANGELOG.md
387
+ source_code_uri: https://github.com/holidays/holidays
388
+ bug_tracker_uri: https://github.com/holidays/holidays/issues
382
389
  post_install_message:
383
390
  rdoc_options: []
384
391
  require_paths:
@@ -394,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
401
  - !ruby/object:Gem::Version
395
402
  version: '0'
396
403
  requirements: []
397
- rubygems_version: 3.0.3
404
+ rubygems_version: 3.5.10
398
405
  signing_key:
399
406
  specification_version: 4
400
407
  summary: A collection of Ruby methods to deal with statutory and other holidays.
@@ -427,7 +434,6 @@ test_files:
427
434
  - test/defs/test_defs_dk.rb
428
435
  - test/defs/test_defs_ecbtarget.rb
429
436
  - test/defs/test_defs_ee.rb
430
- - test/defs/test_defs_el.rb
431
437
  - test/defs/test_defs_es.rb
432
438
  - test/defs/test_defs_europe.rb
433
439
  - test/defs/test_defs_fed_ex.rb
@@ -438,6 +444,7 @@ test_files:
438
444
  - test/defs/test_defs_fr.rb
439
445
  - test/defs/test_defs_gb.rb
440
446
  - test/defs/test_defs_ge.rb
447
+ - test/defs/test_defs_gr.rb
441
448
  - test/defs/test_defs_hk.rb
442
449
  - test/defs/test_defs_hr.rb
443
450
  - test/defs/test_defs_hu.rb
@@ -445,6 +452,7 @@ test_files:
445
452
  - test/defs/test_defs_is.rb
446
453
  - test/defs/test_defs_it.rb
447
454
  - test/defs/test_defs_jp.rb
455
+ - test/defs/test_defs_ke.rb
448
456
  - test/defs/test_defs_kr.rb
449
457
  - test/defs/test_defs_kz.rb
450
458
  - test/defs/test_defs_li.rb