holidays 5.7.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +1 -1
- data/CHANGELOG.md +11 -0
- data/lib/generated_definitions/north_america.rb +1 -1
- data/lib/generated_definitions/tr.rb +1 -0
- data/lib/generated_definitions/us.rb +1 -1
- data/lib/holidays/definition/context/generator.rb +5 -36
- data/lib/holidays/definition/decorator/test.rb +37 -0
- data/lib/holidays/definition/entity/test.rb +11 -0
- data/lib/holidays/definition/generator/test.rb +51 -0
- data/lib/holidays/definition/parser/test.rb +86 -0
- data/lib/holidays/definition/validator/test.rb +71 -0
- data/lib/holidays/errors.rb +3 -0
- data/lib/holidays/factory/definition.rb +24 -0
- data/lib/holidays/version.rb +1 -1
- data/test/coverage_report.rb +1 -0
- data/test/data/test_custom_year_range_holiday_defs.yaml +7 -0
- data/test/data/test_multiple_custom_holiday_defs.yaml +7 -4
- data/test/data/test_single_custom_holiday_defs.yaml +7 -4
- data/test/data/test_single_custom_holiday_with_custom_procs.yaml +11 -7
- data/test/defs/test_defs_ar.rb +33 -19
- data/test/defs/test_defs_at.rb +14 -11
- data/test/defs/test_defs_au.rb +172 -141
- data/test/defs/test_defs_be_fr.rb +23 -14
- data/test/defs/test_defs_be_nl.rb +23 -14
- data/test/defs/test_defs_bg.rb +29 -17
- data/test/defs/test_defs_br.rb +33 -19
- data/test/defs/test_defs_ca.rb +175 -176
- data/test/defs/test_defs_ch.rb +29 -23
- data/test/defs/test_defs_cl.rb +49 -27
- data/test/defs/test_defs_cr.rb +17 -11
- data/test/defs/test_defs_cz.rb +25 -15
- data/test/defs/test_defs_de.rb +52 -61
- data/test/defs/test_defs_dk.rb +31 -19
- data/test/defs/test_defs_ecb_target.rb +14 -10
- data/test/defs/test_defs_ee.rb +28 -20
- data/test/defs/test_defs_el.rb +29 -17
- data/test/defs/test_defs_es.rb +114 -52
- data/test/defs/test_defs_europe.rb +1154 -715
- data/test/defs/test_defs_federal_reserve.rb +99 -57
- data/test/defs/test_defs_fedex.rb +19 -12
- data/test/defs/test_defs_fi.rb +47 -27
- data/test/defs/test_defs_fr.rb +29 -24
- data/test/defs/test_defs_gb.rb +90 -51
- data/test/defs/test_defs_ge.rb +40 -28
- data/test/defs/test_defs_hk.rb +47 -26
- data/test/defs/test_defs_hr.rb +32 -18
- data/test/defs/test_defs_hu.rb +26 -16
- data/test/defs/test_defs_ie.rb +41 -25
- data/test/defs/test_defs_is.rb +39 -22
- data/test/defs/test_defs_it.rb +23 -14
- data/test/defs/test_defs_jp.rb +112 -59
- data/test/defs/test_defs_kr.rb +25 -17
- data/test/defs/test_defs_li.rb +20 -20
- data/test/defs/test_defs_lt.rb +51 -30
- data/test/defs/test_defs_lu.rb +17 -12
- data/test/defs/test_defs_ma.rb +17 -11
- data/test/defs/test_defs_mt_en.rb +28 -19
- data/test/defs/test_defs_mt_mt.rb +28 -19
- data/test/defs/test_defs_mx.rb +33 -22
- data/test/defs/test_defs_my.rb +11 -8
- data/test/defs/test_defs_nerc.rb +17 -11
- data/test/defs/test_defs_nl.rb +21 -13
- data/test/defs/test_defs_no.rb +31 -18
- data/test/defs/test_defs_north_america.rb +507 -393
- data/test/defs/test_defs_nyse.rb +26 -15
- data/test/defs/test_defs_nz.rb +47 -28
- data/test/defs/test_defs_pe.rb +35 -20
- data/test/defs/test_defs_ph.rb +17 -11
- data/test/defs/test_defs_pl.rb +200 -119
- data/test/defs/test_defs_pt.rb +33 -24
- data/test/defs/test_defs_ro.rb +39 -24
- data/test/defs/test_defs_rs_cyrl.rb +33 -26
- data/test/defs/test_defs_rs_la.rb +33 -26
- data/test/defs/test_defs_ru.rb +22 -16
- data/test/defs/test_defs_scandinavia.rb +193 -116
- data/test/defs/test_defs_se.rb +47 -28
- data/test/defs/test_defs_sg.rb +13 -9
- data/test/defs/test_defs_si.rb +93 -24
- data/test/defs/test_defs_sk.rb +29 -17
- data/test/defs/test_defs_tn.rb +15 -10
- data/test/defs/test_defs_tr.rb +39 -30
- data/test/defs/test_defs_united_nations.rb +0 -1
- data/test/defs/test_defs_ups.rb +19 -12
- data/test/defs/test_defs_us.rb +333 -217
- data/test/defs/test_defs_ve.rb +23 -16
- data/test/defs/test_defs_vi.rb +10 -8
- data/test/defs/test_defs_za.rb +23 -14
- data/test/holidays/definition/context/test_generator.rb +40 -13
- data/test/holidays/definition/decorator/test_test.rb +123 -0
- data/test/holidays/definition/generator/test_test.rb +113 -0
- data/test/holidays/definition/parser/test_test.rb +142 -0
- data/test/holidays/definition/validator/test_region.rb +5 -0
- data/test/holidays/definition/validator/test_test.rb +60 -0
- metadata +15 -8
- data/test/holidays/factory/test_date_calculator.rb +0 -32
- data/test/holidays/factory/test_definition.rb +0 -62
- data/test/holidays/factory/test_finder.rb +0 -25
data/test/defs/test_defs_pt.rb
CHANGED
@@ -7,32 +7,41 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class PtDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_pt
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
10
|
+
assert_equal "Ano Novo", (Holidays.on(Date.civil(2008, 1, 1), [:pt], [:informal])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Carnaval", (Holidays.on(Date.civil(2005, 2, 8), [:pt], [:informal])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Carnaval", (Holidays.on(Date.civil(2006, 2, 28), [:pt], [:informal])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Carnaval", (Holidays.on(Date.civil(2007, 2, 20), [:pt], [:informal])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Carnaval", (Holidays.on(Date.civil(2008, 2, 5), [:pt], [:informal])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Sexta-feira Santa", (Holidays.on(Date.civil(2008, 3, 21), [:pt], [:informal])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Páscoa", (Holidays.on(Date.civil(2008, 3, 23), [:pt], [:informal])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Páscoa", (Holidays.on(Date.civil(2016, 3, 27), [:pt], [:informal])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Dia da Liberdade", (Holidays.on(Date.civil(2008, 4, 25), [:pt], [:informal])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Dia do Trabalhador", (Holidays.on(Date.civil(2008, 5, 1), [:pt], [:informal])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "Corpo de Deus", (Holidays.on(Date.civil(2016, 5, 26), [:pt], [:informal])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "Dia de Portugal", (Holidays.on(Date.civil(2008, 6, 10), [:pt], [:informal])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "Assunção de Nossa Senhora", (Holidays.on(Date.civil(2008, 8, 15), [:pt], [:informal])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "Dia da República", (Holidays.on(Date.civil(2008, 10, 5), [:pt], [:informal])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Dia de Todos-os-Santos", (Holidays.on(Date.civil(2008, 11, 1), [:pt], [:informal])[0] || {})[:name]
|
39
|
+
|
40
|
+
assert_equal "Restauração da Independência", (Holidays.on(Date.civil(2008, 12, 1), [:pt], [:informal])[0] || {})[:name]
|
30
41
|
|
31
|
-
|
32
|
-
assert_equal 'Dia de Santo António', Holidays.on(Date.civil(2017, 6, 13), [:pt_li])[0][:name]
|
42
|
+
assert_equal "Imaculada Conceição", (Holidays.on(Date.civil(2008, 12, 8), [:pt], [:informal])[0] || {})[:name]
|
33
43
|
|
34
|
-
|
35
|
-
assert_equal 'Dia de São João', Holidays.on(Date.civil(2017, 6, 24), [:pt_po])[0][:name]
|
44
|
+
assert_equal "Natal", (Holidays.on(Date.civil(2008, 12, 25), [:pt], [:informal])[0] || {})[:name]
|
36
45
|
|
37
46
|
end
|
38
47
|
end
|
data/test/defs/test_defs_ro.rb
CHANGED
@@ -7,30 +7,45 @@ 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
|
-
{
|
11
|
-
|
12
|
-
Date.civil(1961,4,10)
|
13
|
-
|
14
|
-
Date.civil(2013,5,
|
15
|
-
|
16
|
-
Date.civil(
|
17
|
-
|
18
|
-
Date.civil(
|
19
|
-
|
20
|
-
Date.civil(
|
21
|
-
|
22
|
-
Date.civil(
|
23
|
-
|
24
|
-
Date.civil(
|
25
|
-
|
26
|
-
Date.civil(2013,
|
27
|
-
|
28
|
-
Date.civil(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
10
|
+
assert_equal "Paștele - duminică", (Holidays.on(Date.civil(1961, 4, 9), [:ro], [:informal])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Paștele - luni", (Holidays.on(Date.civil(1961, 4, 10), [:ro], [:informal])[0] || {})[:name]
|
13
|
+
|
14
|
+
assert_equal "Paștele - duminică", (Holidays.on(Date.civil(2013, 5, 5), [:ro], [:informal])[0] || {})[:name]
|
15
|
+
|
16
|
+
assert_equal "Paștele - luni", (Holidays.on(Date.civil(2013, 5, 6), [:ro], [:informal])[0] || {})[:name]
|
17
|
+
|
18
|
+
assert_equal "Paștele - duminică", (Holidays.on(Date.civil(2027, 5, 2), [:ro], [:informal])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Paștele - luni", (Holidays.on(Date.civil(2027, 5, 3), [:ro], [:informal])[0] || {})[:name]
|
21
|
+
|
22
|
+
assert_equal "Rusaliile - 51", (Holidays.on(Date.civil(2012, 6, 4), [:ro], [:informal])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Rusaliile - 50", (Holidays.on(Date.civil(2013, 6, 23), [:ro], [:informal])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Rusaliile - 51", (Holidays.on(Date.civil(2013, 6, 24), [:ro], [:informal])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Rusaliile - 50", (Holidays.on(Date.civil(1986, 6, 22), [:ro], [:informal])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "Rusaliile - 51", (Holidays.on(Date.civil(1986, 6, 23), [:ro], [:informal])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "Anul nou", (Holidays.on(Date.civil(2009, 1, 1), [:ro], [:informal])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "Anul nou", (Holidays.on(Date.civil(2014, 1, 2), [:ro], [:informal])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "Ziua muncii", (Holidays.on(Date.civil(2009, 5, 1), [:ro], [:informal])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "Adormirea Maicii Domnului", (Holidays.on(Date.civil(2012, 8, 15), [:ro], [:informal])[0] || {})[:name]
|
39
|
+
|
40
|
+
assert_equal "Sfântul Apostol Andrei", (Holidays.on(Date.civil(2013, 11, 30), [:ro], [:informal])[0] || {})[:name]
|
41
|
+
|
42
|
+
assert_equal "Ziua Națională", (Holidays.on(Date.civil(2013, 12, 1), [:ro], [:informal])[0] || {})[:name]
|
43
|
+
|
44
|
+
assert_equal "Sărbătoarea Nașterii Domnului", (Holidays.on(Date.civil(2013, 12, 25), [:ro], [:informal])[0] || {})[:name]
|
45
|
+
|
46
|
+
assert_equal "Sărbătoarea Nașterii Domnului", (Holidays.on(Date.civil(2013, 12, 26), [:ro], [:informal])[0] || {})[:name]
|
47
|
+
|
48
|
+
assert_nil (Holidays.on(Date.civil(2013, 7, 23), [:ro])[0] || {})[:name]
|
34
49
|
|
35
50
|
end
|
36
51
|
end
|
@@ -7,33 +7,40 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class Rs_cyrlDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_rs_cyrl
|
10
|
-
|
11
|
-
|
12
|
-
Date.civil(2017, 1, 7) => 'Божић',
|
13
|
-
Date.civil(2017, 1, 27) => 'Свети Сава (Савиндан)',
|
14
|
-
Date.civil(2017, 2, 15) => 'Дан државности Србије',
|
15
|
-
Date.civil(2017, 2, 16) => 'Дан државности Србије',
|
16
|
-
Date.civil(2017, 5, 1) => 'Празник рада',
|
17
|
-
Date.civil(2017, 5, 2) => 'Празник рада',
|
18
|
-
Date.civil(2017, 5, 9) => 'Дан победе над фашизмом',
|
19
|
-
Date.civil(2017, 6, 28) => 'Видовдан',
|
20
|
-
Date.civil(2017, 11, 11) => 'Дан примирја'
|
21
|
-
}.each do |date, name|
|
22
|
-
assert_equal name, (Holidays.on(date, :rs_cyrl)[0] || {})[:name]
|
23
|
-
end
|
10
|
+
assert_equal "Нова Година", (Holidays.on(Date.civil(2017, 1, 1), [:rs_cyrl])[0] || {})[:name]
|
11
|
+
assert_equal "Нова Година", (Holidays.on(Date.civil(2017, 1, 2), [:rs_cyrl])[0] || {})[:name]
|
24
12
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
13
|
+
assert_equal "Божић", (Holidays.on(Date.civil(2017, 1, 7), [:rs_cyrl])[0] || {})[:name]
|
14
|
+
|
15
|
+
assert_equal "Свети Сава (Савиндан)", (Holidays.on(Date.civil(2017, 1, 27), [:rs_cyrl])[0] || {})[:name]
|
16
|
+
|
17
|
+
assert_equal "Дан државности Србије", (Holidays.on(Date.civil(2017, 2, 15), [:rs_cyrl])[0] || {})[:name]
|
18
|
+
assert_equal "Дан државности Србије", (Holidays.on(Date.civil(2017, 2, 16), [:rs_cyrl])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 1), [:rs_cyrl])[0] || {})[:name]
|
21
|
+
assert_equal "Празник рада", (Holidays.on(Date.civil(2017, 5, 2), [:rs_cyrl])[0] || {})[:name]
|
22
|
+
|
23
|
+
assert_equal "Дан победе над фашизмом", (Holidays.on(Date.civil(2017, 5, 9), [:rs_cyrl])[0] || {})[:name]
|
24
|
+
|
25
|
+
assert_equal "Видовдан", (Holidays.on(Date.civil(2017, 6, 28), [:rs_cyrl])[0] || {})[:name]
|
26
|
+
|
27
|
+
assert_equal "Дан примирја", (Holidays.on(Date.civil(2017, 11, 11), [:rs_cyrl])[0] || {})[:name]
|
28
|
+
|
29
|
+
assert_equal "Велики петак", (Holidays.on(Date.civil(2017, 4, 14), [:rs_cyrl])[0] || {})[:name]
|
30
|
+
assert_equal "Велики петак", (Holidays.on(Date.civil(2018, 4, 6), [:rs_cyrl])[0] || {})[:name]
|
31
|
+
assert_equal "Велики петак", (Holidays.on(Date.civil(2019, 4, 26), [:rs_cyrl])[0] || {})[:name]
|
32
|
+
|
33
|
+
assert_equal "Велика Субота", (Holidays.on(Date.civil(2017, 4, 15), [:rs_cyrl])[0] || {})[:name]
|
34
|
+
assert_equal "Велика Субота", (Holidays.on(Date.civil(2018, 4, 7), [:rs_cyrl])[0] || {})[:name]
|
35
|
+
assert_equal "Велика Субота", (Holidays.on(Date.civil(2019, 4, 27), [:rs_cyrl])[0] || {})[:name]
|
36
|
+
|
37
|
+
assert_equal "Васкрс", (Holidays.on(Date.civil(2017, 4, 16), [:rs_cyrl])[0] || {})[:name]
|
38
|
+
assert_equal "Васкрс", (Holidays.on(Date.civil(2018, 4, 8), [:rs_cyrl])[0] || {})[:name]
|
39
|
+
assert_equal "Васкрс", (Holidays.on(Date.civil(2019, 4, 28), [:rs_cyrl])[0] || {})[:name]
|
40
|
+
|
41
|
+
assert_equal "Васкрсни понедељак", (Holidays.on(Date.civil(2017, 4, 17), [:rs_cyrl])[0] || {})[:name]
|
42
|
+
assert_equal "Васкрсни понедељак", (Holidays.on(Date.civil(2018, 4, 9), [:rs_cyrl])[0] || {})[:name]
|
43
|
+
assert_equal "Васкрсни понедељак", (Holidays.on(Date.civil(2019, 4, 29), [:rs_cyrl])[0] || {})[:name]
|
37
44
|
|
38
45
|
end
|
39
46
|
end
|
@@ -7,33 +7,40 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class Rs_laDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_rs_la
|
10
|
-
|
11
|
-
|
12
|
-
Date.civil(2017, 1, 7) => 'Božić',
|
13
|
-
Date.civil(2017, 1, 27) => 'Dan Svetog Save',
|
14
|
-
Date.civil(2017, 2, 15) => 'Dan državnosti Srbije',
|
15
|
-
Date.civil(2017, 2, 16) => 'Dan državnosti Srbije',
|
16
|
-
Date.civil(2017, 5, 1) => 'Praznik rada',
|
17
|
-
Date.civil(2017, 5, 2) => 'Praznik rada',
|
18
|
-
Date.civil(2017, 5, 9) => 'Dan pobede',
|
19
|
-
Date.civil(2017, 6, 28) => 'Vidovdan',
|
20
|
-
Date.civil(2017, 11, 11) => 'Dan primirja'
|
21
|
-
}.each do |date, name|
|
22
|
-
assert_equal name, (Holidays.on(date, :rs_la)[0] || {})[:name]
|
23
|
-
end
|
10
|
+
assert_equal "Nova Godina", (Holidays.on(Date.civil(2017, 1, 1), [:rs_la])[0] || {})[:name]
|
11
|
+
assert_equal "Nova Godina", (Holidays.on(Date.civil(2017, 1, 2), [:rs_la])[0] || {})[:name]
|
24
12
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
13
|
+
assert_equal "Božić", (Holidays.on(Date.civil(2017, 1, 7), [:rs_la])[0] || {})[:name]
|
14
|
+
|
15
|
+
assert_equal "Dan Svetog Save", (Holidays.on(Date.civil(2017, 1, 27), [:rs_la])[0] || {})[:name]
|
16
|
+
|
17
|
+
assert_equal "Dan državnosti Srbije", (Holidays.on(Date.civil(2017, 2, 15), [:rs_la])[0] || {})[:name]
|
18
|
+
assert_equal "Dan državnosti Srbije", (Holidays.on(Date.civil(2017, 2, 16), [:rs_la])[0] || {})[:name]
|
19
|
+
|
20
|
+
assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 1), [:rs_la])[0] || {})[:name]
|
21
|
+
assert_equal "Praznik rada", (Holidays.on(Date.civil(2017, 5, 2), [:rs_la])[0] || {})[:name]
|
22
|
+
|
23
|
+
assert_equal "Dan pobede", (Holidays.on(Date.civil(2017, 5, 9), [:rs_la])[0] || {})[:name]
|
24
|
+
|
25
|
+
assert_equal "Vidovdan", (Holidays.on(Date.civil(2017, 6, 28), [:rs_la])[0] || {})[:name]
|
26
|
+
|
27
|
+
assert_equal "Dan primirja", (Holidays.on(Date.civil(2017, 11, 11), [:rs_la])[0] || {})[:name]
|
28
|
+
|
29
|
+
assert_equal "Veliki Petak", (Holidays.on(Date.civil(2017, 4, 14), [:rs_la])[0] || {})[:name]
|
30
|
+
assert_equal "Veliki Petak", (Holidays.on(Date.civil(2018, 4, 6), [:rs_la])[0] || {})[:name]
|
31
|
+
assert_equal "Veliki Petak", (Holidays.on(Date.civil(2019, 4, 26), [:rs_la])[0] || {})[:name]
|
32
|
+
|
33
|
+
assert_equal "Velika Subota", (Holidays.on(Date.civil(2017, 4, 15), [:rs_la])[0] || {})[:name]
|
34
|
+
assert_equal "Velika Subota", (Holidays.on(Date.civil(2018, 4, 7), [:rs_la])[0] || {})[:name]
|
35
|
+
assert_equal "Velika Subota", (Holidays.on(Date.civil(2019, 4, 27), [:rs_la])[0] || {})[:name]
|
36
|
+
|
37
|
+
assert_equal "Uskrs", (Holidays.on(Date.civil(2017, 4, 16), [:rs_la])[0] || {})[:name]
|
38
|
+
assert_equal "Uskrs", (Holidays.on(Date.civil(2018, 4, 8), [:rs_la])[0] || {})[:name]
|
39
|
+
assert_equal "Uskrs", (Holidays.on(Date.civil(2019, 4, 28), [:rs_la])[0] || {})[:name]
|
40
|
+
|
41
|
+
assert_equal "Vaskrsni ponedeljak", (Holidays.on(Date.civil(2017, 4, 17), [:rs_la])[0] || {})[:name]
|
42
|
+
assert_equal "Vaskrsni ponedeljak", (Holidays.on(Date.civil(2018, 4, 9), [:rs_la])[0] || {})[:name]
|
43
|
+
assert_equal "Vaskrsni ponedeljak", (Holidays.on(Date.civil(2019, 4, 29), [:rs_la])[0] || {})[:name]
|
37
44
|
|
38
45
|
end
|
39
46
|
end
|
data/test/defs/test_defs_ru.rb
CHANGED
@@ -7,22 +7,28 @@ require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
|
7
7
|
class RuDefinitionTests < Test::Unit::TestCase # :nodoc:
|
8
8
|
|
9
9
|
def test_ru
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
10
|
+
assert_equal "Новый год", (Holidays.on(Date.civil(2017, 1, 1), [:ru])[0] || {})[:name]
|
11
|
+
|
12
|
+
assert_equal "Новогодний праздник", (Holidays.on(Date.civil(2017, 1, 2), [:ru])[0] || {})[:name]
|
13
|
+
assert_equal "Новогодний праздник", (Holidays.on(Date.civil(2017, 1, 3), [:ru])[0] || {})[:name]
|
14
|
+
assert_equal "Новогодний праздник", (Holidays.on(Date.civil(2017, 1, 4), [:ru])[0] || {})[:name]
|
15
|
+
assert_equal "Новогодний праздник", (Holidays.on(Date.civil(2017, 1, 5), [:ru])[0] || {})[:name]
|
16
|
+
|
17
|
+
assert_equal "Рождество Христово", (Holidays.on(Date.civil(2017, 1, 7), [:ru])[0] || {})[:name]
|
18
|
+
|
19
|
+
assert_equal "День защитника Отечества", (Holidays.on(Date.civil(2017, 2, 23), [:ru])[0] || {})[:name]
|
20
|
+
|
21
|
+
assert_equal "Международный женский день", (Holidays.on(Date.civil(2017, 3, 8), [:ru])[0] || {})[:name]
|
22
|
+
|
23
|
+
assert_equal "Праздник Весны и Труда", (Holidays.on(Date.civil(2017, 5, 1), [:ru])[0] || {})[:name]
|
24
|
+
|
25
|
+
assert_equal "День Победы", (Holidays.on(Date.civil(2017, 5, 9), [:ru])[0] || {})[:name]
|
26
|
+
|
27
|
+
assert_equal "День России", (Holidays.on(Date.civil(2017, 6, 12), [:ru])[0] || {})[:name]
|
28
|
+
|
29
|
+
assert_equal "День Государственного флага Российской Федерации", (Holidays.on(Date.civil(2017, 8, 22), [:ru])[0] || {})[:name]
|
30
|
+
|
31
|
+
assert_equal "День народного единства", (Holidays.on(Date.civil(2017, 11, 4), [:ru])[0] || {})[:name]
|
26
32
|
|
27
33
|
end
|
28
34
|
end
|
@@ -7,128 +7,205 @@ 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
|
-
|
11
|
-
Date.civil(2007,2,18) => 'Fastelavn',
|
12
|
-
Date.civil(2007,4,9) => 'Danmarks besættelse',
|
13
|
-
Date.civil(2007,4,16) => 'Dronningens fødselsdag',
|
14
|
-
Date.civil(2007,4,5) => 'Skærtorsdag',
|
15
|
-
Date.civil(2007,4,6) => 'Langfredag',
|
16
|
-
Date.civil(2007,4,8) => 'Påskedag',
|
17
|
-
Date.civil(2007,4,9) => '2. påskedag',
|
18
|
-
Date.civil(2007,5,1) => 'Arbejdernes kampdag',
|
19
|
-
Date.civil(2007,5,4) => 'Store Bededag',
|
20
|
-
Date.civil(2007,5,17) => 'Kristi Himmelfartsdag',
|
21
|
-
Date.civil(2007,5,27) => 'Pinsedag',
|
22
|
-
Date.civil(2007,5,28) => '2. Pinsedag',
|
23
|
-
Date.civil(2007,6,5) => 'Grundlovsdag',
|
24
|
-
Date.civil(2007,12,24) => 'Juleaftensdag',
|
25
|
-
Date.civil(2007,12,25) => '1. juledag',
|
26
|
-
Date.civil(2007,12,26) => '2. juledag'}.each do |date, name|
|
27
|
-
assert_equal name, (Holidays.on(date, :dk, :informal)[0] || {})[:name]
|
28
|
-
end
|
10
|
+
assert_equal "Nytårsdag", (Holidays.on(Date.civil(2007, 1, 1), [:dk], [:informal])[0] || {})[:name]
|
29
11
|
|
12
|
+
assert_equal "Fastelavn", (Holidays.on(Date.civil(2007, 2, 18), [:dk], [:informal])[0] || {})[:name]
|
30
13
|
|
31
|
-
|
32
|
-
Date.civil(2007,1,6) => 'Þrettándinn',
|
33
|
-
Date.civil(2007,1,19) => 'Bóndadagur',
|
34
|
-
Date.civil(2007,2,18) => 'Konudagur',
|
35
|
-
Date.civil(2007,4,5) => 'Skírdagur',
|
36
|
-
Date.civil(2007,4,6) => 'Föstudaginn langi',
|
37
|
-
Date.civil(2007,4,8) => 'Páskadagur',
|
38
|
-
Date.civil(2007,4,9) => 'Annar í páskum',
|
39
|
-
Date.civil(2007,4,19) => 'Sumardagurinn fyrsti',
|
40
|
-
Date.civil(2007,5,1) => 'Verkalýðsdagurinn',
|
41
|
-
Date.civil(2007,5,17) => 'Uppstigningardagur',
|
42
|
-
Date.civil(2007,5,27) => 'Hvítasunnudagur',
|
43
|
-
Date.civil(2007,5,28) => 'Annar í hvítasunnu',
|
44
|
-
Date.civil(2007,6,3) => 'Sjómannadagurinn',
|
45
|
-
Date.civil(2007,6,17) => 'Lýðveldisdagurinn',
|
46
|
-
Date.civil(2007,8,6) => 'Frídagur verslunarmanna',
|
47
|
-
Date.civil(2007,12,24) => 'Jól',
|
48
|
-
Date.civil(2007,12,25) => 'Jól',
|
49
|
-
Date.civil(2007,12,26) => 'Jól',
|
50
|
-
Date.civil(2007,12,31) => 'Gamlárskvöld'}.each do |date, name|
|
51
|
-
assert_equal name, (Holidays.on(date, :is, :informal)[0] || {})[:name]
|
52
|
-
end
|
14
|
+
assert_equal "2. påskedag", (Holidays.on(Date.civil(2007, 4, 9), [:dk], [:informal])[0] || {})[:name]
|
53
15
|
|
16
|
+
assert_equal "Dronningens fødselsdag", (Holidays.on(Date.civil(2007, 4, 16), [:dk], [:informal])[0] || {})[:name]
|
54
17
|
|
55
|
-
|
56
|
-
Date.civil(2010,5,1) => '1. mai',
|
57
|
-
Date.civil(2010,5,17) => '17. mai',
|
58
|
-
Date.civil(2010,12,24) => 'Julaften',
|
59
|
-
Date.civil(2010,12,25) => '1. juledag',
|
60
|
-
Date.civil(2010,12,26) => '2. juledag',
|
61
|
-
Date.civil(2010,12,31) => 'Nyttårsaften',
|
62
|
-
Date.civil(2010,2,14) => 'Fastelavn',
|
63
|
-
Date.civil(2010,3,28) => 'Palmesøndag',
|
64
|
-
Date.civil(2010,4,1) => 'Skjærtorsdag',
|
65
|
-
Date.civil(2010,4,2) => 'Langfredag',
|
66
|
-
Date.civil(2010,4,4) => '1. påskedag',
|
67
|
-
Date.civil(2010,4,5) => '2. påskedag',
|
68
|
-
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
|
69
|
-
Date.civil(2010,5,23) => '1. pinsedag',
|
70
|
-
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
|
71
|
-
assert_equal name, (Holidays.on(date, :no, :informal)[0] || {})[:name]
|
72
|
-
end
|
73
|
-
|
74
|
-
|
75
|
-
{Date.civil(2008,1,1) => 'Nyårsdagen',
|
76
|
-
Date.civil(2008,1,6) => 'Trettondedag jul',
|
77
|
-
Date.civil(2008,3,21) => 'Långfredagen',
|
78
|
-
Date.civil(2008,3,22) => 'Påskafton',
|
79
|
-
Date.civil(2008,3,23) => 'Påskdagen',
|
80
|
-
Date.civil(2008,3,24) => 'Annandag påsk',
|
81
|
-
Date.civil(2008,5,1) => 'Första maj',
|
82
|
-
Date.civil(2008,5,1) => 'Kristi himmelsfärdsdag',
|
83
|
-
Date.civil(2008,5,11) => 'Pingstdagen',
|
84
|
-
Date.civil(2008,6,6) => 'Nationaldagen',
|
85
|
-
Date.civil(2005,6,25) => 'Midsommardagen',
|
86
|
-
Date.civil(2006,6,24) => 'Midsommardagen',
|
87
|
-
Date.civil(2006,6,23) => 'Midsommarafton',
|
88
|
-
Date.civil(2007,6,23) => 'Midsommardagen',
|
89
|
-
Date.civil(2007,6,22) => 'Midsommarafton',
|
90
|
-
Date.civil(2008,6,21) => 'Midsommardagen',
|
91
|
-
Date.civil(2008,6,20) => 'Midsommarafton',
|
92
|
-
Date.civil(2005,11,5) => 'Alla helgons dag',
|
93
|
-
Date.civil(2006,11,4) => 'Alla helgons dag',
|
94
|
-
Date.civil(2007,11,3) => 'Alla helgons dag',
|
95
|
-
Date.civil(2008,11,1) => 'Alla helgons dag',
|
96
|
-
Date.civil(2008,12,24) => 'Julafton',
|
97
|
-
Date.civil(2008,12,25) => 'Juldagen',
|
98
|
-
Date.civil(2008,12,26) => 'Annandag jul',
|
99
|
-
Date.civil(2008,12,31) => 'Nyårsafton'
|
100
|
-
}.each do |date, name|
|
101
|
-
assert_equal name, (Holidays.on(date, :se, :informal)[0] || {})[:name]
|
102
|
-
end
|
18
|
+
assert_equal "Skærtorsdag", (Holidays.on(Date.civil(2007, 4, 5), [:dk], [:informal])[0] || {})[:name]
|
103
19
|
|
20
|
+
assert_equal "Langfredag", (Holidays.on(Date.civil(2007, 4, 6), [:dk], [:informal])[0] || {})[:name]
|
104
21
|
|
105
|
-
|
106
|
-
|
107
|
-
Date.civil(
|
108
|
-
|
109
|
-
Date.civil(
|
110
|
-
|
111
|
-
Date.civil(
|
112
|
-
|
113
|
-
Date.civil(
|
114
|
-
|
115
|
-
Date.civil(
|
116
|
-
|
117
|
-
Date.civil(
|
118
|
-
|
119
|
-
Date.civil(
|
120
|
-
|
121
|
-
Date.civil(
|
122
|
-
|
123
|
-
Date.civil(
|
124
|
-
|
125
|
-
Date.civil(
|
126
|
-
|
127
|
-
Date.civil(
|
128
|
-
|
129
|
-
Date.civil(
|
130
|
-
|
131
|
-
|
22
|
+
assert_equal "Påskedag", (Holidays.on(Date.civil(2007, 4, 8), [:dk], [:informal])[0] || {})[:name]
|
23
|
+
|
24
|
+
assert_equal "Arbejdernes kampdag", (Holidays.on(Date.civil(2007, 5, 1), [:dk], [:informal])[0] || {})[:name]
|
25
|
+
|
26
|
+
assert_equal "Store Bededag", (Holidays.on(Date.civil(2007, 5, 4), [:dk], [:informal])[0] || {})[:name]
|
27
|
+
|
28
|
+
assert_equal "Kristi Himmelfartsdag", (Holidays.on(Date.civil(2007, 5, 17), [:dk], [:informal])[0] || {})[:name]
|
29
|
+
|
30
|
+
assert_equal "Pinsedag", (Holidays.on(Date.civil(2007, 5, 27), [:dk], [:informal])[0] || {})[:name]
|
31
|
+
|
32
|
+
assert_equal "2. Pinsedag", (Holidays.on(Date.civil(2007, 5, 28), [:dk], [:informal])[0] || {})[:name]
|
33
|
+
|
34
|
+
assert_equal "Grundlovsdag", (Holidays.on(Date.civil(2007, 6, 5), [:dk], [:informal])[0] || {})[:name]
|
35
|
+
|
36
|
+
assert_equal "Juleaftensdag", (Holidays.on(Date.civil(2007, 12, 24), [:dk], [:informal])[0] || {})[:name]
|
37
|
+
|
38
|
+
assert_equal "1. juledag", (Holidays.on(Date.civil(2007, 12, 25), [:dk], [:informal])[0] || {})[:name]
|
39
|
+
|
40
|
+
assert_equal "2. juledag", (Holidays.on(Date.civil(2007, 12, 26), [:dk], [:informal])[0] || {})[:name]
|
41
|
+
|
42
|
+
assert_equal "Nýársdagur", (Holidays.on(Date.civil(2007, 1, 1), [:is], [:informal])[0] || {})[:name]
|
43
|
+
|
44
|
+
assert_equal "Þrettándinn", (Holidays.on(Date.civil(2007, 1, 6), [:is], [:informal])[0] || {})[:name]
|
45
|
+
|
46
|
+
assert_equal "Bóndadagur", (Holidays.on(Date.civil(2007, 1, 19), [:is], [:informal])[0] || {})[:name]
|
47
|
+
|
48
|
+
assert_equal "Konudagur", (Holidays.on(Date.civil(2007, 2, 18), [:is], [:informal])[0] || {})[:name]
|
49
|
+
|
50
|
+
assert_equal "Skírdagur", (Holidays.on(Date.civil(2007, 4, 5), [:is], [:informal])[0] || {})[:name]
|
51
|
+
|
52
|
+
assert_equal "Föstudaginn langi", (Holidays.on(Date.civil(2007, 4, 6), [:is], [:informal])[0] || {})[:name]
|
53
|
+
|
54
|
+
assert_equal "Páskadagur", (Holidays.on(Date.civil(2007, 4, 8), [:is], [:informal])[0] || {})[:name]
|
55
|
+
|
56
|
+
assert_equal "Annar í páskum", (Holidays.on(Date.civil(2007, 4, 9), [:is], [:informal])[0] || {})[:name]
|
57
|
+
|
58
|
+
assert_equal "Sumardagurinn fyrsti", (Holidays.on(Date.civil(2007, 4, 19), [:is], [:informal])[0] || {})[:name]
|
59
|
+
|
60
|
+
assert_equal "Verkalýðsdagurinn", (Holidays.on(Date.civil(2007, 5, 1), [:is], [:informal])[0] || {})[:name]
|
61
|
+
|
62
|
+
assert_equal "Uppstigningardagur", (Holidays.on(Date.civil(2007, 5, 17), [:is], [:informal])[0] || {})[:name]
|
63
|
+
|
64
|
+
assert_equal "Hvítasunnudagur", (Holidays.on(Date.civil(2007, 5, 27), [:is], [:informal])[0] || {})[:name]
|
65
|
+
|
66
|
+
assert_equal "Annar í hvítasunnu", (Holidays.on(Date.civil(2007, 5, 28), [:is], [:informal])[0] || {})[:name]
|
67
|
+
|
68
|
+
assert_equal "Sjómannadagurinn", (Holidays.on(Date.civil(2007, 6, 3), [:is], [:informal])[0] || {})[:name]
|
69
|
+
|
70
|
+
assert_equal "Lýðveldisdagurinn", (Holidays.on(Date.civil(2007, 6, 17), [:is], [:informal])[0] || {})[:name]
|
71
|
+
|
72
|
+
assert_equal "Frídagur verslunarmanna", (Holidays.on(Date.civil(2007, 8, 6), [:is], [:informal])[0] || {})[:name]
|
73
|
+
|
74
|
+
assert_equal "Jól", (Holidays.on(Date.civil(2007, 12, 24), [:is], [:informal])[0] || {})[:name]
|
75
|
+
|
76
|
+
assert_equal "Jól", (Holidays.on(Date.civil(2007, 12, 25), [:is], [:informal])[0] || {})[:name]
|
77
|
+
|
78
|
+
assert_equal "Jól", (Holidays.on(Date.civil(2007, 12, 26), [:is], [:informal])[0] || {})[:name]
|
79
|
+
|
80
|
+
assert_equal "Gamlárskvöld", (Holidays.on(Date.civil(2007, 12, 31), [:is], [:informal])[0] || {})[:name]
|
81
|
+
|
82
|
+
assert_equal "Nyttårsdag", (Holidays.on(Date.civil(2010, 1, 1), [:no], [:informal])[0] || {})[:name]
|
83
|
+
|
84
|
+
assert_equal "1. mai", (Holidays.on(Date.civil(2010, 5, 1), [:no], [:informal])[0] || {})[:name]
|
85
|
+
|
86
|
+
assert_equal "17. mai", (Holidays.on(Date.civil(2010, 5, 17), [:no], [:informal])[0] || {})[:name]
|
87
|
+
|
88
|
+
assert_equal "Julaften", (Holidays.on(Date.civil(2010, 12, 24), [:no], [:informal])[0] || {})[:name]
|
89
|
+
|
90
|
+
assert_equal "1. juledag", (Holidays.on(Date.civil(2010, 12, 25), [:no], [:informal])[0] || {})[:name]
|
91
|
+
|
92
|
+
assert_equal "2. juledag", (Holidays.on(Date.civil(2010, 12, 26), [:no], [:informal])[0] || {})[:name]
|
93
|
+
|
94
|
+
assert_equal "Nyttårsaften", (Holidays.on(Date.civil(2010, 12, 31), [:no], [:informal])[0] || {})[:name]
|
95
|
+
|
96
|
+
assert_equal "Fastelavn", (Holidays.on(Date.civil(2010, 2, 14), [:no], [:informal])[0] || {})[:name]
|
97
|
+
|
98
|
+
assert_equal "Palmesøndag", (Holidays.on(Date.civil(2010, 3, 28), [:no], [:informal])[0] || {})[:name]
|
99
|
+
|
100
|
+
assert_equal "Skjærtorsdag", (Holidays.on(Date.civil(2010, 4, 1), [:no], [:informal])[0] || {})[:name]
|
101
|
+
|
102
|
+
assert_equal "Langfredag", (Holidays.on(Date.civil(2010, 4, 2), [:no], [:informal])[0] || {})[:name]
|
103
|
+
|
104
|
+
assert_equal "1. påskedag", (Holidays.on(Date.civil(2010, 4, 4), [:no], [:informal])[0] || {})[:name]
|
105
|
+
|
106
|
+
assert_equal "2. påskedag", (Holidays.on(Date.civil(2010, 4, 5), [:no], [:informal])[0] || {})[:name]
|
107
|
+
|
108
|
+
assert_equal "Kristi Himmelfartsdag", (Holidays.on(Date.civil(2010, 5, 13), [:no], [:informal])[0] || {})[:name]
|
109
|
+
|
110
|
+
assert_equal "1. pinsedag", (Holidays.on(Date.civil(2010, 5, 23), [:no], [:informal])[0] || {})[:name]
|
111
|
+
|
112
|
+
assert_equal "2. pinsedag", (Holidays.on(Date.civil(2010, 5, 24), [:no], [:informal])[0] || {})[:name]
|
113
|
+
|
114
|
+
assert_equal "Nyårsdagen", (Holidays.on(Date.civil(2008, 1, 1), [:se], [:informal])[0] || {})[:name]
|
115
|
+
|
116
|
+
assert_equal "Trettondedag jul", (Holidays.on(Date.civil(2008, 1, 6), [:se], [:informal])[0] || {})[:name]
|
117
|
+
|
118
|
+
assert_equal "Långfredagen", (Holidays.on(Date.civil(2008, 3, 21), [:se], [:informal])[0] || {})[:name]
|
119
|
+
|
120
|
+
assert_equal "Påskafton", (Holidays.on(Date.civil(2008, 3, 22), [:se], [:informal])[0] || {})[:name]
|
121
|
+
|
122
|
+
assert_equal "Påskdagen", (Holidays.on(Date.civil(2008, 3, 23), [:se], [:informal])[0] || {})[:name]
|
123
|
+
|
124
|
+
assert_equal "Annandag påsk", (Holidays.on(Date.civil(2008, 3, 24), [:se], [:informal])[0] || {})[:name]
|
125
|
+
|
126
|
+
assert_equal "Kristi himmelsfärdsdag", (Holidays.on(Date.civil(2008, 5, 1), [:se], [:informal])[0] || {})[:name]
|
127
|
+
|
128
|
+
assert_equal "Pingstdagen", (Holidays.on(Date.civil(2008, 5, 11), [:se], [:informal])[0] || {})[:name]
|
129
|
+
|
130
|
+
assert_equal "Nationaldagen", (Holidays.on(Date.civil(2008, 6, 6), [:se], [:informal])[0] || {})[:name]
|
131
|
+
|
132
|
+
assert_equal "Midsommardagen", (Holidays.on(Date.civil(2005, 6, 25), [:se], [:informal])[0] || {})[:name]
|
133
|
+
|
134
|
+
assert_equal "Midsommardagen", (Holidays.on(Date.civil(2006, 6, 24), [:se], [:informal])[0] || {})[:name]
|
135
|
+
|
136
|
+
assert_equal "Midsommarafton", (Holidays.on(Date.civil(2006, 6, 23), [:se], [:informal])[0] || {})[:name]
|
137
|
+
|
138
|
+
assert_equal "Midsommardagen", (Holidays.on(Date.civil(2007, 6, 23), [:se], [:informal])[0] || {})[:name]
|
139
|
+
|
140
|
+
assert_equal "Midsommarafton", (Holidays.on(Date.civil(2007, 6, 22), [:se], [:informal])[0] || {})[:name]
|
141
|
+
|
142
|
+
assert_equal "Midsommardagen", (Holidays.on(Date.civil(2008, 6, 21), [:se], [:informal])[0] || {})[:name]
|
143
|
+
|
144
|
+
assert_equal "Midsommarafton", (Holidays.on(Date.civil(2008, 6, 20), [:se], [:informal])[0] || {})[:name]
|
145
|
+
|
146
|
+
assert_equal "Alla helgons dag", (Holidays.on(Date.civil(2005, 11, 5), [:se], [:informal])[0] || {})[:name]
|
147
|
+
|
148
|
+
assert_equal "Alla helgons dag", (Holidays.on(Date.civil(2006, 11, 4), [:se], [:informal])[0] || {})[:name]
|
149
|
+
|
150
|
+
assert_equal "Alla helgons dag", (Holidays.on(Date.civil(2007, 11, 3), [:se], [:informal])[0] || {})[:name]
|
151
|
+
|
152
|
+
assert_equal "Alla helgons dag", (Holidays.on(Date.civil(2008, 11, 1), [:se], [:informal])[0] || {})[:name]
|
153
|
+
|
154
|
+
assert_equal "Julafton", (Holidays.on(Date.civil(2008, 12, 24), [:se], [:informal])[0] || {})[:name]
|
155
|
+
|
156
|
+
assert_equal "Juldagen", (Holidays.on(Date.civil(2008, 12, 25), [:se], [:informal])[0] || {})[:name]
|
157
|
+
|
158
|
+
assert_equal "Annandag jul", (Holidays.on(Date.civil(2008, 12, 26), [:se], [:informal])[0] || {})[:name]
|
159
|
+
|
160
|
+
assert_equal "Nyårsafton", (Holidays.on(Date.civil(2008, 12, 31), [:se], [:informal])[0] || {})[:name]
|
161
|
+
|
162
|
+
assert_equal "Uudenvuodenpäivä", (Holidays.on(Date.civil(2008, 1, 1), [:fi], [:informal])[0] || {})[:name]
|
163
|
+
|
164
|
+
assert_equal "Loppiainen", (Holidays.on(Date.civil(2008, 1, 6), [:fi], [:informal])[0] || {})[:name]
|
165
|
+
|
166
|
+
assert_equal "Pitkäperjantai", (Holidays.on(Date.civil(2008, 3, 21), [:fi], [:informal])[0] || {})[:name]
|
167
|
+
|
168
|
+
assert_equal "Pääsiäispäivä", (Holidays.on(Date.civil(2008, 3, 23), [:fi], [:informal])[0] || {})[:name]
|
169
|
+
|
170
|
+
assert_equal "2. Pääsiäispäivä", (Holidays.on(Date.civil(2008, 3, 24), [:fi], [:informal])[0] || {})[:name]
|
171
|
+
|
172
|
+
assert_equal "Helatorstai", (Holidays.on(Date.civil(2008, 5, 1), [:fi], [:informal])[0] || {})[:name]
|
173
|
+
|
174
|
+
assert_equal "Helluntaipäivä", (Holidays.on(Date.civil(2008, 5, 11), [:fi], [:informal])[0] || {})[:name]
|
175
|
+
|
176
|
+
assert_equal "Juhannusaatto", (Holidays.on(Date.civil(2009, 6, 19), [:fi], [:informal])[0] || {})[:name]
|
177
|
+
|
178
|
+
assert_equal "Juhannusaatto", (Holidays.on(Date.civil(2010, 6, 25), [:fi], [:informal])[0] || {})[:name]
|
179
|
+
|
180
|
+
assert_equal "Juhannusaatto", (Holidays.on(Date.civil(2011, 6, 24), [:fi], [:informal])[0] || {})[:name]
|
181
|
+
|
182
|
+
assert_equal "Juhannusaatto", (Holidays.on(Date.civil(2012, 6, 22), [:fi], [:informal])[0] || {})[:name]
|
183
|
+
|
184
|
+
assert_equal "Juhannusaatto", (Holidays.on(Date.civil(2013, 6, 21), [:fi], [:informal])[0] || {})[:name]
|
185
|
+
|
186
|
+
assert_equal "Juhannuspäivä", (Holidays.on(Date.civil(2005, 6, 25), [:fi], [:informal])[0] || {})[:name]
|
187
|
+
|
188
|
+
assert_equal "Juhannuspäivä", (Holidays.on(Date.civil(2006, 6, 24), [:fi], [:informal])[0] || {})[:name]
|
189
|
+
|
190
|
+
assert_equal "Juhannuspäivä", (Holidays.on(Date.civil(2007, 6, 23), [:fi], [:informal])[0] || {})[:name]
|
191
|
+
|
192
|
+
assert_equal "Juhannuspäivä", (Holidays.on(Date.civil(2008, 6, 21), [:fi], [:informal])[0] || {})[:name]
|
193
|
+
|
194
|
+
assert_equal "Pyhäinpäivä", (Holidays.on(Date.civil(2005, 11, 5), [:fi], [:informal])[0] || {})[:name]
|
195
|
+
|
196
|
+
assert_equal "Pyhäinpäivä", (Holidays.on(Date.civil(2006, 11, 4), [:fi], [:informal])[0] || {})[:name]
|
197
|
+
|
198
|
+
assert_equal "Pyhäinpäivä", (Holidays.on(Date.civil(2007, 11, 3), [:fi], [:informal])[0] || {})[:name]
|
199
|
+
|
200
|
+
assert_equal "Pyhäinpäivä", (Holidays.on(Date.civil(2008, 11, 1), [:fi], [:informal])[0] || {})[:name]
|
201
|
+
|
202
|
+
assert_equal "Itsenäisyyspäivä", (Holidays.on(Date.civil(2008, 12, 6), [:fi], [:informal])[0] || {})[:name]
|
203
|
+
|
204
|
+
assert_equal "Jouluaatto", (Holidays.on(Date.civil(2008, 12, 24), [:fi], [:informal])[0] || {})[:name]
|
205
|
+
|
206
|
+
assert_equal "Joulupäivä", (Holidays.on(Date.civil(2008, 12, 25), [:fi], [:informal])[0] || {})[:name]
|
207
|
+
|
208
|
+
assert_equal "Tapaninpäivä", (Holidays.on(Date.civil(2008, 12, 26), [:fi], [:informal])[0] || {})[:name]
|
132
209
|
|
133
210
|
end
|
134
211
|
end
|