holidays 6.6.1 → 8.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +25 -0
- data/CHANGELOG.md +76 -0
- data/README.md +74 -60
- data/doc/CONTRIBUTING.md +2 -1
- data/holidays.gemspec +10 -5
- data/lib/generated_definitions/MANIFEST +13 -5
- data/lib/generated_definitions/REGIONS.rb +2 -2
- data/lib/generated_definitions/ar.rb +28 -9
- data/lib/generated_definitions/at.rb +2 -2
- data/lib/generated_definitions/au.rb +60 -12
- data/lib/generated_definitions/be_fr.rb +2 -2
- data/lib/generated_definitions/be_nl.rb +2 -2
- data/lib/generated_definitions/bg.rb +2 -2
- data/lib/generated_definitions/br.rb +4 -3
- data/lib/generated_definitions/ca.rb +25 -17
- data/lib/generated_definitions/ch.rb +15 -3
- data/lib/generated_definitions/cl.rb +7 -7
- data/lib/generated_definitions/co.rb +2 -2
- data/lib/generated_definitions/cr.rb +2 -2
- data/lib/generated_definitions/cz.rb +2 -2
- data/lib/generated_definitions/de.rb +12 -7
- data/lib/generated_definitions/dk.rb +3 -3
- data/lib/generated_definitions/{ecb_target.rb → ecbtarget.rb} +10 -10
- data/lib/generated_definitions/ee.rb +2 -2
- data/lib/generated_definitions/el.rb +2 -2
- data/lib/generated_definitions/es.rb +6 -4
- data/lib/generated_definitions/europe.rb +135 -46
- data/lib/generated_definitions/{federal_reserve.rb → federalreserve.rb} +15 -14
- data/lib/generated_definitions/federalreservebanks.rb +35 -0
- data/lib/generated_definitions/fedex.rb +2 -2
- data/lib/generated_definitions/fi.rb +2 -2
- data/lib/generated_definitions/fr.rb +4 -4
- data/lib/generated_definitions/gb.rb +15 -7
- data/lib/generated_definitions/ge.rb +2 -2
- data/lib/generated_definitions/gr.rb +38 -0
- data/lib/generated_definitions/hk.rb +2 -2
- data/lib/generated_definitions/hr.rb +10 -8
- data/lib/generated_definitions/hu.rb +4 -3
- data/lib/generated_definitions/ie.rb +2 -2
- data/lib/generated_definitions/is.rb +2 -2
- data/lib/generated_definitions/it.rb +16 -7
- data/lib/generated_definitions/jp.rb +31 -16
- data/lib/generated_definitions/ke.rb +34 -0
- data/lib/generated_definitions/kr.rb +2 -2
- data/lib/generated_definitions/kz.rb +38 -0
- data/lib/generated_definitions/li.rb +2 -2
- data/lib/generated_definitions/lt.rb +4 -3
- data/lib/generated_definitions/lu.rb +4 -2
- data/lib/generated_definitions/lv.rb +56 -0
- data/lib/generated_definitions/ma.rb +2 -2
- data/lib/generated_definitions/mt_en.rb +2 -2
- data/lib/generated_definitions/mt_mt.rb +2 -2
- data/lib/generated_definitions/mx.rb +7 -7
- data/lib/generated_definitions/my.rb +2 -2
- data/lib/generated_definitions/nerc.rb +2 -2
- data/lib/generated_definitions/ng.rb +33 -0
- data/lib/generated_definitions/nl.rb +2 -2
- data/lib/generated_definitions/no.rb +2 -2
- data/lib/generated_definitions/{north_america.rb → northamerica.rb} +34 -26
- data/lib/generated_definitions/nyse.rb +3 -2
- data/lib/generated_definitions/nz.rb +43 -4
- data/lib/generated_definitions/pe.rb +2 -2
- data/lib/generated_definitions/ph.rb +2 -2
- data/lib/generated_definitions/pl.rb +2 -2
- data/lib/generated_definitions/pt.rb +2 -2
- data/lib/generated_definitions/ro.rb +6 -3
- data/lib/generated_definitions/rs_cyrl.rb +3 -3
- data/lib/generated_definitions/rs_la.rb +3 -3
- data/lib/generated_definitions/ru.rb +2 -2
- data/lib/generated_definitions/scandinavia.rb +3 -3
- data/lib/generated_definitions/se.rb +2 -2
- data/lib/generated_definitions/sg.rb +2 -2
- data/lib/generated_definitions/si.rb +4 -3
- data/lib/generated_definitions/sk.rb +2 -2
- data/lib/generated_definitions/{south_america.rb → southamerica.rb} +33 -13
- data/lib/generated_definitions/th.rb +36 -0
- data/lib/generated_definitions/tn.rb +2 -2
- data/lib/generated_definitions/tr.rb +7 -5
- data/lib/generated_definitions/ua.rb +37 -0
- data/lib/generated_definitions/{united_nations.rb → unitednations.rb} +61 -61
- data/lib/generated_definitions/ups.rb +2 -2
- data/lib/generated_definitions/us.rb +9 -9
- data/lib/generated_definitions/ve.rb +2 -2
- data/lib/generated_definitions/vi.rb +2 -2
- data/lib/generated_definitions/za.rb +3 -3
- data/lib/holidays/definition/context/generator.rb +23 -70
- data/lib/holidays/definition/generator/module.rb +54 -0
- data/lib/holidays/definition/generator/regions.rb +1 -1
- data/lib/holidays/definition/repository/holidays_by_month.rb +9 -1
- data/lib/holidays/factory/definition.rb +7 -0
- data/lib/holidays/finder/context/search.rb +35 -31
- data/lib/holidays/finder/rules/year_range.rb +30 -54
- data/lib/holidays/version.rb +1 -1
- data/lib/holidays.rb +2 -0
- data/test/coverage_report.rb +23 -5
- data/test/data/test_custom_year_range_holiday_defs.yaml +6 -10
- data/test/data/test_multiple_regions_with_conflicts_region_1.yaml +38 -0
- data/test/data/test_multiple_regions_with_conflicts_region_2.yaml +38 -0
- data/test/defs/test_defs_ar.rb +20 -4
- data/test/defs/test_defs_au.rb +33 -0
- data/test/defs/test_defs_br.rb +4 -0
- data/test/defs/test_defs_ca.rb +71 -8
- data/test/defs/test_defs_ch.rb +4 -0
- data/test/defs/test_defs_co.rb +3 -3
- data/test/defs/test_defs_de.rb +10 -0
- data/test/defs/test_defs_dk.rb +4 -0
- data/test/defs/{test_defs_ecb_target.rb → test_defs_ecbtarget.rb} +11 -11
- data/test/defs/test_defs_es.rb +2 -0
- data/test/defs/test_defs_europe.rb +262 -39
- data/test/defs/test_defs_federalreserve.rb +119 -0
- data/test/defs/test_defs_federalreservebanks.rb +251 -0
- data/test/defs/test_defs_fr.rb +3 -3
- data/test/defs/test_defs_gb.rb +42 -0
- data/test/defs/{test_defs_el.rb → test_defs_gr.rb} +18 -18
- data/test/defs/test_defs_hr.rb +6 -6
- data/test/defs/test_defs_hu.rb +12 -4
- data/test/defs/test_defs_it.rb +20 -0
- data/test/defs/test_defs_jp.rb +22 -2
- data/test/defs/test_defs_ke.rb +31 -0
- data/test/defs/test_defs_kz.rb +39 -0
- data/test/defs/test_defs_lt.rb +2 -0
- data/test/defs/test_defs_lu.rb +6 -0
- data/test/defs/test_defs_lv.rb +98 -0
- data/test/defs/test_defs_mx.rb +3 -1
- data/test/defs/test_defs_ng.rb +29 -0
- data/test/defs/{test_defs_north_america.rb → test_defs_northamerica.rb} +85 -20
- data/test/defs/test_defs_nyse.rb +7 -0
- data/test/defs/test_defs_nz.rb +8 -0
- data/test/defs/test_defs_ro.rb +14 -0
- data/test/defs/test_defs_rs_cyrl.rb +1 -1
- data/test/defs/test_defs_rs_la.rb +1 -1
- data/test/defs/test_defs_scandinavia.rb +4 -0
- data/test/defs/{test_defs_south_america.rb → test_defs_southamerica.rb} +29 -9
- data/test/defs/test_defs_th.rb +33 -0
- data/test/defs/test_defs_tr.rb +7 -0
- data/test/defs/test_defs_ua.rb +41 -0
- data/test/defs/{test_defs_united_nations.rb → test_defs_unitednations.rb} +3 -3
- data/test/defs/test_defs_us.rb +11 -11
- data/test/holidays/core_extensions/test_date.rb +3 -2
- data/test/holidays/definition/context/test_generator.rb +17 -20
- data/test/holidays/definition/generator/test_module.rb +268 -0
- data/test/holidays/definition/repository/test_holidays_by_month.rb +121 -1
- data/test/holidays/finder/rules/test_year_range.rb +43 -47
- data/test/integration/test_available_regions.rb +1 -1
- data/test/integration/test_custom_year_range_holidays.rb +0 -7
- data/test/integration/test_holidays.rb +2 -36
- data/test/integration/test_holidays_between.rb +11 -1
- data/test/integration/test_multiple_regions_with_conflict.rb +29 -0
- data/test/integration/test_nonstandard_regions.rb +25 -0
- metadata +71 -35
- data/test/defs/test_defs_federal_reserve.rb +0 -113
@@ -0,0 +1,98 @@
|
|
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/lv.yaml
|
7
|
+
class LvDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_lv
|
10
|
+
assert_equal "Jaungada diena", (Holidays.on(Date.civil(2018, 1, 1), [:lv])[0] || {})[:name]
|
11
|
+
assert_equal "Jaungada diena", (Holidays.on(Date.civil(2019, 1, 1), [:lv])[0] || {})[:name]
|
12
|
+
assert_equal "Jaungada diena", (Holidays.on(Date.civil(2029, 1, 1), [:lv])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2018, 3, 30), [:lv])[0] || {})[:name]
|
15
|
+
assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2019, 4, 19), [:lv])[0] || {})[:name]
|
16
|
+
assert_equal "Lielā Piektdiena", (Holidays.on(Date.civil(2039, 4, 8), [:lv])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2018, 4, 1), [:lv])[0] || {})[:name]
|
19
|
+
assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2019, 4, 21), [:lv])[0] || {})[:name]
|
20
|
+
assert_equal "Pirmās Lieldienas", (Holidays.on(Date.civil(2039, 4, 10), [:lv])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2018, 4, 2), [:lv])[0] || {})[:name]
|
23
|
+
assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2019, 4, 22), [:lv])[0] || {})[:name]
|
24
|
+
assert_equal "Otrās Lieldienas", (Holidays.on(Date.civil(2039, 4, 11), [:lv])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2018, 5, 1), [:lv])[0] || {})[:name]
|
27
|
+
assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2019, 5, 1), [:lv])[0] || {})[:name]
|
28
|
+
assert_equal "Darba svētki, Latvijas Republikas Satversmes sapulces sasaukšanas diena", (Holidays.on(Date.civil(2029, 5, 1), [:lv])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2018, 5, 4), [:lv])[0] || {})[:name]
|
31
|
+
assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 4), [:lv])[0] || {})[:name]
|
32
|
+
assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2019, 5, 6), [:lv], [:observed])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "Latvijas Republikas Neatkarības atjaunošanas diena", (Holidays.on(Date.civil(2020, 5, 4), [:lv], [:observed])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Mātes diena", (Holidays.on(Date.civil(2019, 5, 12), [:lv])[0] || {})[:name]
|
39
|
+
assert_equal "Mātes diena", (Holidays.on(Date.civil(2020, 5, 10), [:lv])[0] || {})[:name]
|
40
|
+
assert_equal "Mātes diena", (Holidays.on(Date.civil(2029, 5, 13), [:lv])[0] || {})[:name]
|
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
|
+
|
44
|
+
assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2019, 6, 9), [:lv])[0] || {})[:name]
|
45
|
+
assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2020, 5, 31), [:lv])[0] || {})[:name]
|
46
|
+
assert_equal "Vasarsvētki", (Holidays.on(Date.civil(2029, 5, 20), [:lv])[0] || {})[:name]
|
47
|
+
|
48
|
+
assert_equal "Līgo diena", (Holidays.on(Date.civil(2019, 6, 23), [:lv])[0] || {})[:name]
|
49
|
+
assert_equal "Līgo diena", (Holidays.on(Date.civil(2020, 6, 23), [:lv])[0] || {})[:name]
|
50
|
+
assert_equal "Līgo diena", (Holidays.on(Date.civil(2029, 6, 23), [:lv])[0] || {})[:name]
|
51
|
+
|
52
|
+
assert_equal "Jāņu diena", (Holidays.on(Date.civil(2019, 6, 24), [:lv])[0] || {})[:name]
|
53
|
+
assert_equal "Jāņu diena", (Holidays.on(Date.civil(2020, 6, 24), [:lv])[0] || {})[:name]
|
54
|
+
assert_equal "Jāņu diena", (Holidays.on(Date.civil(2029, 6, 24), [:lv])[0] || {})[:name]
|
55
|
+
|
56
|
+
assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 8), [:lv])[0] || {})[:name]
|
57
|
+
assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 9), [:lv])[0] || {})[:name]
|
58
|
+
|
59
|
+
assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2018, 7, 9), [:lv], [:observed])[0] || {})[:name]
|
60
|
+
assert_equal "Vispārējo latviešu Dziesmu un deju svētku noslēguma diena", (Holidays.on(Date.civil(2023, 7, 10), [:lv], [:observed])[0] || {})[:name]
|
61
|
+
|
62
|
+
assert_nil (Holidays.on(Date.civil(2019, 7, 8), [:lv])[0] || {})[:name]
|
63
|
+
assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:lv])[0] || {})[:name]
|
64
|
+
assert_nil (Holidays.on(Date.civil(2022, 7, 8), [:lv])[0] || {})[:name]
|
65
|
+
assert_nil (Holidays.on(Date.civil(2022, 7, 9), [:lv])[0] || {})[:name]
|
66
|
+
assert_nil (Holidays.on(Date.civil(2024, 7, 8), [:lv])[0] || {})[:name]
|
67
|
+
assert_nil (Holidays.on(Date.civil(2024, 7, 9), [:lv])[0] || {})[:name]
|
68
|
+
|
69
|
+
assert_equal "Viņa Svētības pāvesta Franciska pastorālās vizītes Latvijā diena", (Holidays.on(Date.civil(2018, 9, 24), [:lv])[0] || {})[:name]
|
70
|
+
|
71
|
+
assert_nil (Holidays.on(Date.civil(2019, 9, 24), [:lv])[0] || {})[:name]
|
72
|
+
|
73
|
+
assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2019, 11, 18), [:lv])[0] || {})[:name]
|
74
|
+
assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv])[0] || {})[:name]
|
75
|
+
assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 18), [:lv])[0] || {})[:name]
|
76
|
+
|
77
|
+
assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2020, 11, 18), [:lv], [:observed])[0] || {})[:name]
|
78
|
+
|
79
|
+
assert_equal "Latvijas Republikas Proklamēšanas diena", (Holidays.on(Date.civil(2029, 11, 19), [:lv], [:observed])[0] || {})[:name]
|
80
|
+
|
81
|
+
assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2019, 12, 24), [:lv])[0] || {})[:name]
|
82
|
+
assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2020, 12, 24), [:lv])[0] || {})[:name]
|
83
|
+
assert_equal "Ziemassvētku vakars", (Holidays.on(Date.civil(2029, 12, 24), [:lv])[0] || {})[:name]
|
84
|
+
|
85
|
+
assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 25), [:lv])[0] || {})[:name]
|
86
|
+
assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 25), [:lv])[0] || {})[:name]
|
87
|
+
assert_equal "Pirmie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 25), [:lv])[0] || {})[:name]
|
88
|
+
|
89
|
+
assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2019, 12, 26), [:lv])[0] || {})[:name]
|
90
|
+
assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2020, 12, 26), [:lv])[0] || {})[:name]
|
91
|
+
assert_equal "Otrie Ziemassvētki", (Holidays.on(Date.civil(2029, 12, 26), [:lv])[0] || {})[:name]
|
92
|
+
|
93
|
+
assert_equal "Vecgada diena", (Holidays.on(Date.civil(2019, 12, 31), [:lv])[0] || {})[:name]
|
94
|
+
assert_equal "Vecgada diena", (Holidays.on(Date.civil(2020, 12, 31), [:lv])[0] || {})[:name]
|
95
|
+
assert_equal "Vecgada diena", (Holidays.on(Date.civil(2029, 12, 31), [:lv])[0] || {})[:name]
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
data/test/defs/test_defs_mx.rb
CHANGED
@@ -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/mx.yaml, definitions/
|
6
|
+
# Definitions loaded: definitions/mx.yaml, definitions/northamericainformal.yaml
|
7
7
|
class MxDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_mx
|
@@ -15,6 +15,8 @@ class MxDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
15
15
|
|
16
16
|
assert_equal "Cinco de Mayo", (Holidays.on(Date.civil(2007, 5, 5), [:mx], [:informal])[0] || {})[:name]
|
17
17
|
|
18
|
+
assert_equal "Grito de Dolores", (Holidays.on(Date.civil(2007, 9, 15), [:mx], [:informal])[0] || {})[:name]
|
19
|
+
|
18
20
|
assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2007, 9, 16), [:mx], [:informal])[0] || {})[:name]
|
19
21
|
|
20
22
|
assert_equal "Todos los Santos", (Holidays.on(Date.civil(2007, 11, 1), [:mx], [:informal])[0] || {})[:name]
|
@@ -0,0 +1,29 @@
|
|
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/ng.yaml
|
7
|
+
class NgDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_ng
|
10
|
+
assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:ng])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Easter Monday", (Holidays.on(Date.civil(2008, 3, 24), [:ng])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ng])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Workers' Day", (Holidays.on(Date.civil(2008, 5, 1), [:ng])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Children's Day", (Holidays.on(Date.civil(2008, 5, 27), [:ng], [:informal])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Democracy Day", (Holidays.on(Date.civil(2019, 6, 12), [:ng])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Independence Day", (Holidays.on(Date.civil(2008, 10, 1), [:ng])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ng])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Boxing Day", (Holidays.on(Date.civil(2008, 12, 26), [:ng])[0] || {})[:name]
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -3,10 +3,10 @@ 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/ca.yaml, definitions/mx.yaml, definitions/us.yaml, definitions/
|
7
|
-
class
|
6
|
+
# Definitions loaded: definitions/ca.yaml, definitions/mx.yaml, definitions/us.yaml, definitions/northamericainformal.yaml
|
7
|
+
class NorthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
|
-
def
|
9
|
+
def test_northamerica
|
10
10
|
assert_equal "New Year's Day", (Holidays.on(Date.civil(2008, 1, 1), [:ca], [:informal])[0] || {})[:name]
|
11
11
|
|
12
12
|
assert_equal "Good Friday", (Holidays.on(Date.civil(2008, 3, 21), [:ca], [:informal])[0] || {})[:name]
|
@@ -19,7 +19,7 @@ class North_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
19
19
|
|
20
20
|
assert_equal "Labour Day", (Holidays.on(Date.civil(2008, 9, 1), [:ca], [:informal])[0] || {})[:name]
|
21
21
|
|
22
|
-
assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:
|
22
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2008, 12, 25), [:ca_on], [:informal])[0] || {})[:name]
|
23
23
|
|
24
24
|
assert_equal "Family Day", (Holidays.on(Date.civil(1990, 2, 19), [:ca_ab])[0] || {})[:name]
|
25
25
|
|
@@ -73,7 +73,7 @@ class North_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
73
73
|
|
74
74
|
assert_equal "Family Day", (Holidays.on(Date.civil(2014, 2, 10), [:ca_bc])[0] || {})[:name]
|
75
75
|
|
76
|
-
assert_equal "Family Day", (Holidays.on(Date.civil(
|
76
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2018, 2, 12), [:ca_bc])[0] || {})[:name]
|
77
77
|
|
78
78
|
assert_nil (Holidays.on(Date.civil(2000, 2, 14), [:ca_bc])[0] || {})[:name]
|
79
79
|
|
@@ -81,6 +81,22 @@ class North_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
81
81
|
|
82
82
|
assert_nil (Holidays.on(Date.civil(2012, 2, 13), [:ca_bc])[0] || {})[:name]
|
83
83
|
|
84
|
+
assert_nil (Holidays.on(Date.civil(2019, 2, 11), [:ca_bc])[0] || {})[:name]
|
85
|
+
|
86
|
+
assert_nil (Holidays.on(Date.civil(2044, 2, 8), [:ca_bc])[0] || {})[:name]
|
87
|
+
|
88
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2019, 2, 18), [:ca_bc])[0] || {})[:name]
|
89
|
+
|
90
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2020, 2, 17), [:ca_bc])[0] || {})[:name]
|
91
|
+
|
92
|
+
assert_equal "Family Day", (Holidays.on(Date.civil(2044, 2, 15), [:ca_bc])[0] || {})[:name]
|
93
|
+
|
94
|
+
assert_nil (Holidays.on(Date.civil(2000, 2, 21), [:ca_bc])[0] || {})[:name]
|
95
|
+
|
96
|
+
assert_nil (Holidays.on(Date.civil(2011, 2, 21), [:ca_bc])[0] || {})[:name]
|
97
|
+
|
98
|
+
assert_nil (Holidays.on(Date.civil(2018, 2, 19), [:ca_bc])[0] || {})[:name]
|
99
|
+
|
84
100
|
assert_equal "Family Day", (Holidays.on(Date.civil(2018, 2, 19), [:ca_nb])[0] || {})[:name]
|
85
101
|
|
86
102
|
assert_equal "Family Day", (Holidays.on(Date.civil(2019, 2, 18), [:ca_nb])[0] || {})[:name]
|
@@ -185,16 +201,45 @@ assert_equal "Remembrance Day", (Holidays.on(Date.civil(2017, 11, 13), [:ca_ab,
|
|
185
201
|
|
186
202
|
assert_equal "Canada Day", (Holidays.on(Date.civil(2017, 7, 3), [:ca], [:observed])[0] || {})[:name]
|
187
203
|
|
188
|
-
assert_equal "
|
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
|
+
|
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]
|
215
|
+
|
216
|
+
assert_nil (Holidays.on(Date.civil(2020, 9, 30), [:ca])[0] || {})[:name]
|
217
|
+
|
218
|
+
assert_nil (Holidays.on(Date.civil(1985, 9, 30), [:ca])[0] || {})[:name]
|
219
|
+
|
220
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 25), [:ca_on])[0] || {})[:name]
|
221
|
+
|
222
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2018, 12, 25), [:ca_on])[0] || {})[:name]
|
223
|
+
|
224
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 25), [:ca_on])[0] || {})[:name]
|
189
225
|
|
190
|
-
|
226
|
+
assert_nil (Holidays.on(Date.civil(2022, 12, 25), [:ca], [:observed])[0] || {})[:name]
|
191
227
|
|
192
|
-
assert_equal "Christmas Day", (Holidays.on(Date.civil(
|
228
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2010, 12, 24), [:ca_on], [:observed])[0] || {})[:name]
|
193
229
|
|
194
|
-
assert_equal "
|
230
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2012, 12, 25), [:ca_on], [:observed])[0] || {})[:name]
|
231
|
+
|
232
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2016, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
|
233
|
+
|
234
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:ca_ab, :ca_bc, :ca_mb, :ca_nb, :ca_nl, :ca_nt, :ca_ns, :ca_nu, :ca_pe, :ca_qc, :ca_sk, :ca_yt], [:observed])[0] || {})[:name]
|
235
|
+
|
236
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
|
237
|
+
|
238
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
|
239
|
+
|
240
|
+
assert_equal "Boxing Day", (Holidays.on(Date.civil(2010, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
|
195
241
|
assert_equal "Boxing Day", (Holidays.on(Date.civil(2012, 12, 26), [:ca_on], [:observed])[0] || {})[:name]
|
196
242
|
assert_equal "Boxing Day", (Holidays.on(Date.civil(2015, 12, 28), [:ca_on], [:observed])[0] || {})[:name]
|
197
|
-
assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:observed])[0] || {})[:name]
|
198
243
|
|
199
244
|
assert_nil (Holidays.on(Date.civil(2015, 6, 21), [:ca_yt])[0] || {})[:name]
|
200
245
|
|
@@ -204,6 +249,24 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
|
|
204
249
|
|
205
250
|
assert_equal "National Aboriginal Day", (Holidays.on(Date.civil(2018, 6, 21), [:ca_yt])[0] || {})[:name]
|
206
251
|
|
252
|
+
assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2019, 8, 5), [:ca_mb], [:informal])[0] || {})[:name]
|
253
|
+
|
254
|
+
assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
|
255
|
+
|
256
|
+
assert_nil (Holidays.on(Date.civil(2020, 8, 3), [:ca_mb])[0] || {})[:name]
|
257
|
+
|
258
|
+
assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2015, 8, 3), [:ca_mb], [:informal])[0] || {})[:name]
|
259
|
+
|
260
|
+
assert_equal "Terry Fox Day", (Holidays.on(Date.civil(2045, 8, 7), [:ca_mb], [:informal])[0] || {})[:name]
|
261
|
+
|
262
|
+
assert_equal "Nunavut Day", (Holidays.on(Date.civil(2020, 7, 9), [:ca_nu])[0] || {})[:name]
|
263
|
+
|
264
|
+
assert_equal "Nunavut Day", (Holidays.on(Date.civil(2021, 7, 9), [:ca_nu])[0] || {})[:name]
|
265
|
+
|
266
|
+
assert_nil (Holidays.on(Date.civil(2019, 7, 9), [:ca_nu])[0] || {})[:name]
|
267
|
+
|
268
|
+
assert_nil (Holidays.on(Date.civil(2018, 7, 9), [:ca_nu])[0] || {})[:name]
|
269
|
+
|
207
270
|
assert_equal "Año nuevo", (Holidays.on(Date.civil(2007, 1, 1), [:mx], [:informal])[0] || {})[:name]
|
208
271
|
|
209
272
|
assert_equal "Día de la Constitución", (Holidays.on(Date.civil(2007, 2, 5), [:mx], [:informal])[0] || {})[:name]
|
@@ -212,6 +275,8 @@ assert_equal "Boxing Day", (Holidays.on(Date.civil(2016, 12, 27), [:ca_on], [:ob
|
|
212
275
|
|
213
276
|
assert_equal "Cinco de Mayo", (Holidays.on(Date.civil(2007, 5, 5), [:mx], [:informal])[0] || {})[:name]
|
214
277
|
|
278
|
+
assert_equal "Grito de Dolores", (Holidays.on(Date.civil(2007, 9, 15), [:mx], [:informal])[0] || {})[:name]
|
279
|
+
|
215
280
|
assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2007, 9, 16), [:mx], [:informal])[0] || {})[:name]
|
216
281
|
|
217
282
|
assert_equal "Todos los Santos", (Holidays.on(Date.civil(2007, 11, 1), [:mx], [:informal])[0] || {})[:name]
|
@@ -302,10 +367,6 @@ assert_equal "Presidents' Day", (Holidays.on(Date.civil(2018, 2, 19), [:us])[0]
|
|
302
367
|
assert_nil (Holidays.on(Date.civil(2018, 3, 5), [:us])[0] || {})[:name]
|
303
368
|
assert_nil (Holidays.on(Date.civil(2019, 3, 4), [:us])[0] || {})[:name]
|
304
369
|
|
305
|
-
assert_equal "Casimir Pulaski Day", (Holidays.on(Date.civil(2017, 3, 6), [:us_il])[0] || {})[:name]
|
306
|
-
assert_equal "Casimir Pulaski Day", (Holidays.on(Date.civil(2018, 3, 5), [:us_il])[0] || {})[:name]
|
307
|
-
assert_equal "Casimir Pulaski Day", (Holidays.on(Date.civil(2019, 3, 4), [:us_il])[0] || {})[:name]
|
308
|
-
|
309
370
|
assert_nil (Holidays.on(Date.civil(2017, 3, 7), [:us])[0] || {})[:name]
|
310
371
|
assert_nil (Holidays.on(Date.civil(2018, 3, 6), [:us])[0] || {})[:name]
|
311
372
|
assert_nil (Holidays.on(Date.civil(2019, 3, 5), [:us])[0] || {})[:name]
|
@@ -342,7 +403,7 @@ assert_equal "Seward's Day", (Holidays.on(Date.civil(2019, 3, 25), [:us_ak])[0]
|
|
342
403
|
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2022, 4, 15), [:us_dc, :us_ca], [:observed])[0] || {})[:name]
|
343
404
|
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2028, 4, 17), [:us_dc, :us_ca], [:observed])[0] || {})[:name]
|
344
405
|
|
345
|
-
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2017, 4, 16), [:us_dc
|
406
|
+
assert_equal "Emancipation Day", (Holidays.on(Date.civil(2017, 4, 16), [:us_dc])[0] || {})[:name]
|
346
407
|
|
347
408
|
assert_nil (Holidays.on(Date.civil(2017, 4, 17), [:us])[0] || {})[:name]
|
348
409
|
assert_nil (Holidays.on(Date.civil(2018, 4, 16), [:us])[0] || {})[:name]
|
@@ -412,6 +473,10 @@ assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2022, 6, 10), [:us
|
|
412
473
|
|
413
474
|
assert_equal "King Kamehameha I Day", (Holidays.on(Date.civil(2017, 6, 11), [:us_hi])[0] || {})[:name]
|
414
475
|
|
476
|
+
assert_nil (Holidays.on(Date.civil(2021, 6, 19), [:us], [:observed])[0] || {})[:name]
|
477
|
+
|
478
|
+
assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2021, 6, 18), [:us], [:observed])[0] || {})[:name]
|
479
|
+
|
415
480
|
assert_equal "Emancipation Day in Texas", (Holidays.on(Date.civil(2017, 6, 19), [:us_tx])[0] || {})[:name]
|
416
481
|
|
417
482
|
assert_nil (Holidays.on(Date.civil(2017, 6, 20), [:us])[0] || {})[:name]
|
@@ -518,9 +583,9 @@ assert_equal "Nevada Day", (Holidays.on(Date.civil(2019, 10, 25), [:us_nv])[0] |
|
|
518
583
|
assert_nil (Holidays.on(Date.civil(2018, 11, 6), [:us])[0] || {})[:name]
|
519
584
|
assert_nil (Holidays.on(Date.civil(2021, 11, 2), [:us])[0] || {})[:name]
|
520
585
|
|
521
|
-
assert_equal "Election Day", (Holidays.on(Date.civil(2017, 11, 7), [:us_de, :us_hi, :
|
522
|
-
assert_equal "Election Day", (Holidays.on(Date.civil(2018, 11, 6), [:us_de, :us_hi, :
|
523
|
-
assert_equal "Election Day", (Holidays.on(Date.civil(2021, 11, 2), [:us_de, :us_hi, :
|
586
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2017, 11, 7), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
587
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2018, 11, 6), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
588
|
+
assert_equal "Election Day", (Holidays.on(Date.civil(2021, 11, 2), [:us_de, :us_hi, :us_in, :us_mt, :us_nj, :us_ny, :us_pa, :us_ri])[0] || {})[:name]
|
524
589
|
|
525
590
|
assert_equal "Veterans Day", (Holidays.on(Date.civil(2017, 11, 10), [:us], [:observed])[0] || {})[:name]
|
526
591
|
assert_equal "Veterans Day", (Holidays.on(Date.civil(2018, 11, 12), [:us], [:observed])[0] || {})[:name]
|
@@ -570,9 +635,9 @@ assert_equal "Christmas Eve (Holiday)", (Holidays.on(Date.civil(2028, 12, 22), [
|
|
570
635
|
assert_nil (Holidays.on(Date.civil(2022, 12, 26), [:us])[0] || {})[:name]
|
571
636
|
assert_nil (Holidays.on(Date.civil(2027, 12, 27), [:us])[0] || {})[:name]
|
572
637
|
|
573
|
-
assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12,
|
638
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2021, 12, 24), [:us], [:observed])[0] || {})[:name]
|
574
639
|
assert_equal "Christmas Day", (Holidays.on(Date.civil(2022, 12, 26), [:us], [:observed])[0] || {})[:name]
|
575
|
-
assert_equal "Christmas Day", (Holidays.on(Date.civil(2027, 12,
|
640
|
+
assert_equal "Christmas Day", (Holidays.on(Date.civil(2027, 12, 24), [:us], [:observed])[0] || {})[:name]
|
576
641
|
|
577
642
|
assert_equal "Christmas Day", (Holidays.on(Date.civil(2017, 12, 25), [:us])[0] || {})[:name]
|
578
643
|
|
data/test/defs/test_defs_nyse.rb
CHANGED
@@ -35,5 +35,12 @@ assert_equal "New Year's Day", (Holidays.on(Date.civil(2012, 1, 2), [:nyse], [:o
|
|
35
35
|
assert_equal "New Year's Day", (Holidays.on(Date.civil(2011, 1, 1), [:nyse], [:observed])[0] || {})[:name]
|
36
36
|
assert_equal "New Year's Day", (Holidays.on(Date.civil(2006, 1, 2), [:nyse], [:observed])[0] || {})[:name]
|
37
37
|
|
38
|
+
assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2022, 6, 20), [:nyse], [:observed])[0] || {})[:name]
|
39
|
+
assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2023, 6, 19), [:nyse], [:observed])[0] || {})[:name]
|
40
|
+
assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2024, 6, 19), [:nyse], [:observed])[0] || {})[:name]
|
41
|
+
assert_equal "Juneteenth National Independence Day", (Holidays.on(Date.civil(2027, 6, 18), [:nyse], [:observed])[0] || {})[:name]
|
42
|
+
|
43
|
+
assert_nil (Holidays.on(Date.civil(2021, 6, 18), [:nyse], [:observed])[0] || {})[:name]
|
44
|
+
|
38
45
|
end
|
39
46
|
end
|
data/test/defs/test_defs_nz.rb
CHANGED
@@ -55,5 +55,13 @@ class NzDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
55
55
|
|
56
56
|
assert_equal "Taranaki Anniversary Day", (Holidays.on(Date.civil(2019, 3, 11), [:nz_ta], [:observed])[0] || {})[:name]
|
57
57
|
|
58
|
+
assert_equal "Matariki", (Holidays.on(Date.civil(2022, 6, 24), [:nz])[0] || {})[:name]
|
59
|
+
|
60
|
+
assert_equal "Matariki", (Holidays.on(Date.civil(2052, 6, 21), [:nz])[0] || {})[:name]
|
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
|
+
|
58
66
|
end
|
59
67
|
end
|
data/test/defs/test_defs_ro.rb
CHANGED
@@ -7,6 +7,12 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class RoDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_ro
|
10
|
+
assert_nil (Holidays.on(Date.civil(2017, 4, 14), [:ro])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2018, 4, 6), [:ro], [:informal])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Paștele - Vinerea Mare", (Holidays.on(Date.civil(2019, 4, 26), [:ro], [:informal])[0] || {})[:name]
|
15
|
+
|
10
16
|
assert_equal "Paștele - duminică", (Holidays.on(Date.civil(1961, 4, 9), [:ro], [:informal])[0] || {})[:name]
|
11
17
|
|
12
18
|
assert_equal "Paștele - luni", (Holidays.on(Date.civil(1961, 4, 10), [:ro], [:informal])[0] || {})[:name]
|
@@ -33,8 +39,16 @@ class RoDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
33
39
|
|
34
40
|
assert_equal "Anul nou", (Holidays.on(Date.civil(2014, 1, 2), [:ro], [:informal])[0] || {})[:name]
|
35
41
|
|
42
|
+
assert_equal "Unirea Principatelor Române", (Holidays.on(Date.civil(2017, 1, 24), [:ro], [:informal])[0] || {})[:name]
|
43
|
+
|
44
|
+
assert_nil (Holidays.on(Date.civil(2016, 1, 24), [:ro])[0] || {})[:name]
|
45
|
+
|
36
46
|
assert_equal "Ziua muncii", (Holidays.on(Date.civil(2009, 5, 1), [:ro], [:informal])[0] || {})[:name]
|
37
47
|
|
48
|
+
assert_equal "Ziua Copilului", (Holidays.on(Date.civil(2017, 6, 1), [:ro], [:informal])[0] || {})[:name]
|
49
|
+
|
50
|
+
assert_nil (Holidays.on(Date.civil(2016, 6, 1), [:ro])[0] || {})[:name]
|
51
|
+
|
38
52
|
assert_equal "Adormirea Maicii Domnului", (Holidays.on(Date.civil(2012, 8, 15), [:ro], [:informal])[0] || {})[:name]
|
39
53
|
|
40
54
|
assert_equal "Sfântul Apostol Andrei", (Holidays.on(Date.civil(2013, 11, 30), [:ro], [:informal])[0] || {})[:name]
|
@@ -20,7 +20,7 @@ assert_equal "Дан државности Србије", (Holidays.on(Date.civil
|
|
20
20
|
assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 1), [:rs_cyrl])[0] || {})[:name]
|
21
21
|
assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 2), [:rs_cyrl])[0] || {})[:name]
|
22
22
|
|
23
|
-
assert_equal "Дан победе над фашизмом", (Holidays.on(Date.civil(2017, 5, 9), [:rs_cyrl])[0] || {})[:name]
|
23
|
+
assert_equal "Дан победе над фашизмом", (Holidays.on(Date.civil(2017, 5, 9), [:rs_cyrl], [:informal])[0] || {})[:name]
|
24
24
|
|
25
25
|
assert_equal "Видовдан", (Holidays.on(Date.civil(2017, 6, 28), [:rs_cyrl])[0] || {})[:name]
|
26
26
|
|
@@ -20,7 +20,7 @@ assert_equal "Dan državnosti Srbije", (Holidays.on(Date.civil(2017, 2, 16), [:r
|
|
20
20
|
assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 1), [:rs_la])[0] || {})[:name]
|
21
21
|
assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 2), [:rs_la])[0] || {})[:name]
|
22
22
|
|
23
|
-
assert_equal "Dan pobede", (Holidays.on(Date.civil(2017, 5, 9), [:rs_la])[0] || {})[:name]
|
23
|
+
assert_equal "Dan pobede", (Holidays.on(Date.civil(2017, 5, 9), [:rs_la], [:informal])[0] || {})[:name]
|
24
24
|
|
25
25
|
assert_equal "Vidovdan", (Holidays.on(Date.civil(2017, 6, 28), [:rs_la])[0] || {})[:name]
|
26
26
|
|
@@ -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]
|
@@ -4,9 +4,9 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
4
4
|
# This file is generated by the Ruby Holiday gem.
|
5
5
|
#
|
6
6
|
# Definitions loaded: definitions/ar.yaml, definitions/br.yaml, definitions/cl.yaml, definitions/co.yaml, definitions/pe.yaml, definitions/ve.yaml
|
7
|
-
class
|
7
|
+
class SouthamericaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
|
-
def
|
9
|
+
def test_southamerica
|
10
10
|
assert_equal "Año Nuevo", (Holidays.on(Date.civil(2016, 1, 1), [:ar], [:informal])[0] || {})[:name]
|
11
11
|
|
12
12
|
assert_equal "Carnaval Lunes", (Holidays.on(Date.civil(2016, 2, 8), [:ar], [:informal])[0] || {})[:name]
|
@@ -31,21 +31,37 @@ class South_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
31
31
|
|
32
32
|
assert_equal "Día de la Revolución de Mayo", (Holidays.on(Date.civil(2016, 5, 25), [:ar], [:informal])[0] || {})[:name]
|
33
33
|
|
34
|
-
assert_equal "
|
34
|
+
assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2020, 6, 15), [:ar], [:informal])[0] || {})[:name]
|
35
|
+
assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2021, 6, 21), [:ar], [:informal])[0] || {})[:name]
|
35
36
|
|
36
|
-
|
37
|
+
assert_nil (Holidays.on(Date.civil(2020, 6, 17), [:ar], [:informal])[0] || {})[:name]
|
38
|
+
assert_nil (Holidays.on(Date.civil(2021, 6, 17), [:ar], [:informal])[0] || {})[:name]
|
39
|
+
|
40
|
+
assert_equal "Paso a la Inmortalidad del General Martín Miguel de Güemes", (Holidays.on(Date.civil(2016, 6, 20), [:ar], [:informal])[0] || {})[:name]
|
37
41
|
|
38
42
|
assert_equal "Día de la Independencia", (Holidays.on(Date.civil(2016, 7, 9), [:ar], [:informal])[0] || {})[:name]
|
39
43
|
|
40
44
|
assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2016, 8, 15), [:ar], [:informal])[0] || {})[:name]
|
45
|
+
assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2020, 8, 17), [:ar], [:informal])[0] || {})[:name]
|
46
|
+
assert_equal "Paso a la Inmortalidad del General José de San Martín", (Holidays.on(Date.civil(2021, 8, 16), [:ar], [:informal])[0] || {})[:name]
|
47
|
+
|
48
|
+
assert_nil (Holidays.on(Date.civil(2016, 8, 17), [:ar], [:informal])[0] || {})[:name]
|
49
|
+
assert_nil (Holidays.on(Date.civil(2021, 8, 17), [:ar], [:informal])[0] || {})[:name]
|
50
|
+
|
51
|
+
assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2016, 10, 10), [:ar], [:informal])[0] || {})[:name]
|
52
|
+
assert_equal "Día del Respeto a la Diversidad Cultural", (Holidays.on(Date.civil(2021, 10, 11), [:ar], [:informal])[0] || {})[:name]
|
41
53
|
|
42
|
-
|
54
|
+
assert_nil (Holidays.on(Date.civil(2021, 10, 12), [:ar], [:informal])[0] || {})[:name]
|
43
55
|
|
44
56
|
assert_equal "Día de la Soberanía Nacional", (Holidays.on(Date.civil(2016, 11, 20), [:ar], [:informal])[0] || {})[:name]
|
45
57
|
|
46
58
|
assert_equal "Inmaculada Concepción de María", (Holidays.on(Date.civil(2016, 12, 8), [:ar], [:informal])[0] || {})[:name]
|
47
59
|
|
48
|
-
assert_equal "Feriado
|
60
|
+
assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 7, 8), [:ar], [:informal])[0] || {})[:name]
|
61
|
+
assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2016, 12, 9), [:ar], [:informal])[0] || {})[:name]
|
62
|
+
assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 5, 24), [:ar], [:informal])[0] || {})[:name]
|
63
|
+
assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 10, 8), [:ar], [:informal])[0] || {})[:name]
|
64
|
+
assert_equal "Feriado con fines turísticos", (Holidays.on(Date.civil(2021, 11, 22), [:ar], [:informal])[0] || {})[:name]
|
49
65
|
|
50
66
|
assert_equal "Navidad", (Holidays.on(Date.civil(2016, 12, 25), [:ar], [:informal])[0] || {})[:name]
|
51
67
|
|
@@ -81,6 +97,10 @@ class South_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
81
97
|
|
82
98
|
assert_equal "Proclamação da República", (Holidays.on(Date.civil(2008, 11, 15), [:br], [:informal])[0] || {})[:name]
|
83
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
|
+
|
84
104
|
assert_equal "Natal", (Holidays.on(Date.civil(2008, 12, 25), [:br], [:informal])[0] || {})[:name]
|
85
105
|
|
86
106
|
assert_equal "Año Nuevo", (Holidays.on(Date.civil(2014, 1, 1), [:cl], [:informal])[0] || {})[:name]
|
@@ -179,11 +199,11 @@ class South_americaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
179
199
|
|
180
200
|
assert_equal "Día de la Ascensión", (Holidays.on(Date.civil(2017, 5, 29), [:co])[0] || {})[:name]
|
181
201
|
|
182
|
-
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2014, 6,
|
202
|
+
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2014, 6, 23), [:co])[0] || {})[:name]
|
183
203
|
|
184
|
-
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2016, 5,
|
204
|
+
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2016, 5, 30), [:co])[0] || {})[:name]
|
185
205
|
|
186
|
-
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2017, 6,
|
206
|
+
assert_equal "Corpus Christi", (Holidays.on(Date.civil(2017, 6, 19), [:co])[0] || {})[:name]
|
187
207
|
|
188
208
|
assert_equal "Sagrado Corazón", (Holidays.on(Date.civil(2014, 6, 30), [:co])[0] || {})[:name]
|
189
209
|
|
@@ -0,0 +1,33 @@
|
|
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/th.yaml
|
7
|
+
class ThDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_th
|
10
|
+
assert_equal "วันขึ้นปีใหม่", (Holidays.on(Date.civil(20019, 1, 1), [:th], [:informal])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "วันจักรี", (Holidays.on(Date.civil(2019, 4, 6), [:th], [:informal])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "วันสงกรานต์", (Holidays.on(Date.civil(2019, 4, 13), [:th], [:informal])[0] || {})[:name]
|
15
|
+
assert_equal "วันสงกรานต์", (Holidays.on(Date.civil(2019, 4, 14), [:th], [:informal])[0] || {})[:name]
|
16
|
+
assert_equal "วันสงกรานต์", (Holidays.on(Date.civil(2019, 4, 15), [:th], [:informal])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "วันเฉลิมพระชนมพรรษาสมเด็จพระเจ้าอยู่หัวมหาวชิราลงกรณ บดินทรเทพยวรางกูร", (Holidays.on(Date.civil(2019, 7, 28), [:th], [:informal])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "วันเฉลิมพระชนมพรรษาสมเด็จพระนางเจ้าสิริกิติ์ พระบรมราชินีนาถในรัชกาลที่ ๙", (Holidays.on(Date.civil(2007, 8, 12), [:th], [:informal])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "วันคล้ายวันสวรรคตพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร", (Holidays.on(Date.civil(2019, 10, 13), [:th], [:informal])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "วันปิยมหาราช", (Holidays.on(Date.civil(2019, 10, 23), [:th], [:informal])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "วันคล้ายวันเฉลิมพระชนมพรรษาพระบาทสมเด็จพระปรมินทรมหาภูมิพลอดุลยเดช บรมนาถบพิตร", (Holidays.on(Date.civil(2019, 12, 5), [:th], [:informal])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "วันรัฐธรรมนูญ", (Holidays.on(Date.civil(2019, 12, 10), [:th], [:informal])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "วันสิ้นปี", (Holidays.on(Date.civil(2019, 12, 31), [:th], [:informal])[0] || {})[:name]
|
31
|
+
|
32
|
+
end
|
33
|
+
end
|
data/test/defs/test_defs_tr.rb
CHANGED
@@ -22,32 +22,39 @@ class TrDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
22
22
|
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2017, 6, 25), [:tr])[0] || {})[:name]
|
23
23
|
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2018, 6, 15), [:tr])[0] || {})[:name]
|
24
24
|
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2019, 6, 4), [:tr])[0] || {})[:name]
|
25
|
+
assert_equal "Ramazan Bayramı", (Holidays.on(Date.civil(2020, 5, 24), [:tr])[0] || {})[:name]
|
25
26
|
|
26
27
|
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2017, 6, 26), [:tr])[0] || {})[:name]
|
27
28
|
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2018, 6, 16), [:tr])[0] || {})[:name]
|
28
29
|
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2019, 6, 5), [:tr])[0] || {})[:name]
|
30
|
+
assert_equal "Ramazan Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2020, 5, 25), [:tr])[0] || {})[:name]
|
29
31
|
|
30
32
|
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2017, 6, 27), [:tr])[0] || {})[:name]
|
31
33
|
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2018, 6, 17), [:tr])[0] || {})[:name]
|
32
34
|
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2019, 6, 6), [:tr])[0] || {})[:name]
|
35
|
+
assert_equal "Ramazan Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2020, 5, 26), [:tr])[0] || {})[:name]
|
33
36
|
|
34
37
|
assert_equal "Demokrasi ve Milli Birlik Günü", (Holidays.on(Date.civil(2017, 7, 15), [:tr])[0] || {})[:name]
|
35
38
|
|
36
39
|
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2017, 9, 1), [:tr])[0] || {})[:name]
|
37
40
|
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2018, 8, 21), [:tr])[0] || {})[:name]
|
38
41
|
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2019, 8, 11), [:tr])[0] || {})[:name]
|
42
|
+
assert_equal "Kurban Bayramı", (Holidays.on(Date.civil(2020, 7, 31), [:tr])[0] || {})[:name]
|
39
43
|
|
40
44
|
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2017, 9, 2), [:tr])[0] || {})[:name]
|
41
45
|
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2018, 8, 22), [:tr])[0] || {})[:name]
|
42
46
|
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2019, 8, 12), [:tr])[0] || {})[:name]
|
47
|
+
assert_equal "Kurban Bayramı (ikinci tatil)", (Holidays.on(Date.civil(2020, 8, 1), [:tr])[0] || {})[:name]
|
43
48
|
|
44
49
|
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2017, 9, 3), [:tr])[0] || {})[:name]
|
45
50
|
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2018, 8, 23), [:tr])[0] || {})[:name]
|
46
51
|
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2019, 8, 13), [:tr])[0] || {})[:name]
|
52
|
+
assert_equal "Kurban Bayramı (üçüncü tatil)", (Holidays.on(Date.civil(2020, 8, 2), [:tr])[0] || {})[:name]
|
47
53
|
|
48
54
|
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2017, 9, 4), [:tr])[0] || {})[:name]
|
49
55
|
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2018, 8, 24), [:tr])[0] || {})[:name]
|
50
56
|
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2019, 8, 14), [:tr])[0] || {})[:name]
|
57
|
+
assert_equal "Kurban Bayramı (dördüncü tatil)", (Holidays.on(Date.civil(2020, 8, 3), [:tr])[0] || {})[:name]
|
51
58
|
|
52
59
|
end
|
53
60
|
end
|
@@ -0,0 +1,41 @@
|
|
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/ua.yaml
|
7
|
+
class UaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
|
+
|
9
|
+
def test_ua
|
10
|
+
assert_equal "Новий Рік", (Holidays.on(Date.civil(2018, 1, 1), [:ua])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 7), [:ua])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 1, 8), [:ua], [:observed])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Міжнародний жіночий день", (Holidays.on(Date.civil(2018, 3, 8), [:ua])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 8), [:ua])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Великдень", (Holidays.on(Date.civil(2018, 4, 9), [:ua], [:observed])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "День праці", (Holidays.on(Date.civil(2018, 5, 1), [:ua])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "День перемоги над нацизмом у Другій світовій війні", (Holidays.on(Date.civil(2018, 5, 9), [:ua])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 27), [:ua])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Трійця", (Holidays.on(Date.civil(2018, 5, 28), [:ua], [:observed])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "День Конституції", (Holidays.on(Date.civil(2018, 6, 28), [:ua])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "День Незалежності", (Holidays.on(Date.civil(2018, 8, 24), [:ua])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 14), [:ua])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "День захисника України", (Holidays.on(Date.civil(2018, 10, 15), [:ua], [:observed])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Різдво Христове", (Holidays.on(Date.civil(2018, 12, 25), [:ua])[0] || {})[:name]
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|