holidays 1.0.6 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +77 -0
- data/Gemfile +2 -6
- data/{README.rdoc → README.md} +46 -39
- data/Rakefile +62 -0
- data/data/au.yaml +11 -1
- data/data/cl.yaml +92 -0
- data/data/de.yaml +24 -0
- data/data/dk.yaml +3 -1
- data/data/ecb_target.yaml +42 -0
- data/data/es.yaml +44 -16
- data/data/fr.yaml +15 -10
- data/data/gb.yaml +14 -1
- data/data/index.yaml +7 -1
- data/data/lt.yaml +88 -0
- data/data/nl.yaml +10 -10
- data/data/se.yaml +26 -3
- data/data/sg.yaml +55 -0
- data/data/si.yaml +84 -0
- data/data/vi.yaml +29 -0
- data/holidays.gemspec +17 -187
- data/lib/holidays.rb +24 -14
- data/lib/holidays/MANIFEST +7 -0
- data/lib/holidays/au.rb +9 -9
- data/lib/holidays/cl.rb +43 -0
- data/lib/holidays/de.rb +1 -1
- data/lib/holidays/dk.rb +2 -2
- data/lib/holidays/ecb_target.rb +34 -0
- data/lib/holidays/es.rb +27 -27
- data/lib/holidays/europe.rb +72 -44
- data/lib/holidays/fr.rb +2 -2
- data/lib/holidays/gb.rb +3 -2
- data/lib/holidays/lt.rb +41 -0
- data/lib/holidays/nl.rb +1 -1
- data/lib/holidays/scandinavia.rb +6 -2
- data/lib/holidays/se.rb +7 -3
- data/lib/holidays/sg.rb +35 -0
- data/lib/holidays/si.rb +42 -0
- data/lib/holidays/version.rb +3 -0
- data/lib/holidays/vi.rb +32 -0
- data/test/defs/test_defs_au.rb +3 -0
- data/test/defs/test_defs_cl.rb +39 -0
- data/test/defs/test_defs_de.rb +24 -0
- data/test/defs/test_defs_dk.rb +1 -0
- data/test/defs/test_defs_ecb_target.rb +23 -0
- data/test/defs/test_defs_es.rb +7 -2
- data/test/defs/test_defs_europe.rb +84 -9
- data/test/defs/test_defs_fr.rb +7 -3
- data/test/defs/test_defs_gb.rb +7 -0
- data/test/defs/test_defs_lt.rb +42 -0
- data/test/defs/test_defs_nl.rb +3 -3
- data/test/defs/test_defs_scandinavia.rb +10 -2
- data/test/defs/test_defs_se.rb +9 -2
- data/test/defs/test_defs_sg.rb +20 -0
- data/test/defs/test_defs_si.rb +36 -0
- data/test/defs/test_defs_vi.rb +18 -0
- data/test/test_all_regions.rb +17 -9
- metadata +123 -105
- data/.travis.yml +0 -15
- data/CHANGELOG.rdoc +0 -57
- data/rakefile.rb +0 -107
data/data/dk.yaml
CHANGED
@@ -68,6 +68,7 @@ months:
|
|
68
68
|
- name: Grundlovsdag
|
69
69
|
regions: [dk]
|
70
70
|
mday: 5
|
71
|
+
type: informal
|
71
72
|
- name: Valdemarsdag og Genforeningsdag
|
72
73
|
regions: [dk]
|
73
74
|
mday: 15
|
@@ -89,6 +90,7 @@ months:
|
|
89
90
|
- name: Juleaftensdag
|
90
91
|
regions: [dk]
|
91
92
|
mday: 24
|
93
|
+
type: informal
|
92
94
|
- name: 1. juledag
|
93
95
|
regions: [dk]
|
94
96
|
mday: 25
|
@@ -114,4 +116,4 @@ tests: |
|
|
114
116
|
Date.civil(2007,12,25) => '1. juledag',
|
115
117
|
Date.civil(2007,12,26) => '2. juledag'}.each do |date, name|
|
116
118
|
assert_equal name, (Holidays.on(date, :dk, :informal)[0] || {})[:name]
|
117
|
-
end
|
119
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# ECB TARGET Closing Days
|
2
|
+
#
|
3
|
+
# Updated: 2014-01-04.
|
4
|
+
# Sources:
|
5
|
+
# - http://www.ecb.europa.eu/home/html/holidays.en.html
|
6
|
+
# - http://www.ecb.europa.eu/press/pr/date/2000/html/pr001214_4.en.html
|
7
|
+
---
|
8
|
+
months:
|
9
|
+
0:
|
10
|
+
- name: Good Friday
|
11
|
+
regions: [ecb_target]
|
12
|
+
function: easter(year)-2
|
13
|
+
- name: Easter Monday
|
14
|
+
regions: [ecb_target]
|
15
|
+
function: easter(year)+1
|
16
|
+
1:
|
17
|
+
- name: New Year's Day
|
18
|
+
regions: [ecb_target]
|
19
|
+
mday: 1
|
20
|
+
5:
|
21
|
+
- name: Labour Day
|
22
|
+
regions: [ecb_target]
|
23
|
+
mday: 1
|
24
|
+
12:
|
25
|
+
- name: Christmas Day
|
26
|
+
regions: [ecb_target]
|
27
|
+
mday: 25
|
28
|
+
- name: Christmas Holiday
|
29
|
+
regions: [ecb_target]
|
30
|
+
mday: 26
|
31
|
+
tests: |
|
32
|
+
{Date.civil(2013,1,1) => 'New Year\'s Day',
|
33
|
+
Date.civil(2013,5,1) => 'Labour Day',
|
34
|
+
Date.civil(2013,3,29) => 'Good Friday',
|
35
|
+
Date.civil(2013,4,1) => 'Easter Monday',
|
36
|
+
Date.civil(2013,12,25) => 'Christmas Day',
|
37
|
+
Date.civil(2013,12,26) => 'Christmas Holiday'}.each do |date, name|
|
38
|
+
assert_equal name, (Holidays.on(date, :ecb_target)[0] || {})[:name]
|
39
|
+
end
|
40
|
+
|
41
|
+
assert_equal 'Good Friday', Date.civil(2013,3,29).holidays(:ecb_target)[0][:name]
|
42
|
+
assert_equal 'Easter Monday', Date.civil(2013,4,1).holidays(:ecb_target)[0][:name]
|
data/data/es.yaml
CHANGED
@@ -7,14 +7,13 @@
|
|
7
7
|
# Sources:
|
8
8
|
# - http://en.wikipedia.org/wiki/Public_holidays_in_Spain
|
9
9
|
# - http://www.timeanddate.com/calendar/index.html?country=16
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# Notes:
|
12
12
|
# - Valencia is encoded as both es_v and es_vc
|
13
|
-
---
|
14
13
|
months:
|
15
|
-
0:
|
14
|
+
0:
|
16
15
|
- name: Jueves Santo
|
17
|
-
regions: [es_pv, es_ct, es_na, es_v, es_vc]
|
16
|
+
regions: [es_pv, es_ct, es_na, es_v, es_vc, es_an]
|
18
17
|
function: easter(year)-3
|
19
18
|
- name: Viernes Santo
|
20
19
|
regions: [es]
|
@@ -22,99 +21,124 @@ months:
|
|
22
21
|
- name: Lunes de Pascua
|
23
22
|
regions: [es_pv, es_ct, es_na, es_v, es_vc]
|
24
23
|
function: easter(year)+1
|
25
|
-
1:
|
24
|
+
1:
|
26
25
|
- name: Año Nuevo
|
27
26
|
regions: [es]
|
28
27
|
mday: 1
|
28
|
+
observed: to_monday_if_sunday
|
29
29
|
- name: Día de Reyes
|
30
30
|
regions: [es]
|
31
31
|
mday: 6
|
32
|
+
observed: to_monday_if_sunday
|
32
33
|
2:
|
33
34
|
- name: Día de Andalucía
|
34
35
|
regions: [es_an]
|
35
36
|
mday: 28
|
37
|
+
observed: to_monday_if_sunday
|
36
38
|
3:
|
37
39
|
- name: Día de las Islas Baleares
|
38
40
|
regions: [es_ib]
|
39
41
|
mday: 1
|
42
|
+
observed: to_monday_if_sunday
|
40
43
|
- name: San José
|
41
44
|
regions: [es_v, es_vc, es_cm, es_mu, es_m]
|
42
45
|
mday: 19
|
46
|
+
observed: to_monday_if_sunday
|
43
47
|
4:
|
44
48
|
- name: San Jorge
|
45
49
|
regions: [es_ar, es_cl]
|
46
50
|
mday: 23
|
51
|
+
observed: to_monday_if_sunday
|
47
52
|
- name: Día de Aragón
|
48
53
|
regions: [es_ar]
|
49
54
|
mday: 23
|
50
|
-
|
55
|
+
observed: to_monday_if_sunday
|
56
|
+
5:
|
51
57
|
- name: Día del Trabajador
|
52
58
|
regions: [es]
|
53
59
|
mday: 1
|
60
|
+
observed: to_monday_if_sunday
|
54
61
|
- name: Fiesta de la Comunidad
|
55
62
|
regions: [es_m]
|
56
63
|
mday: 2
|
64
|
+
observed: to_monday_if_sunday
|
57
65
|
- name: Día de las Canarias
|
58
66
|
regions: [es_cn]
|
59
67
|
mday: 30
|
68
|
+
observed: to_monday_if_sunday
|
60
69
|
- name: Día de la Región Castilla-La Mancha
|
61
70
|
regions: [es_cm]
|
62
71
|
mday: 31
|
72
|
+
observed: to_monday_if_sunday
|
63
73
|
6:
|
64
74
|
- name: Día de la Región de Murcia
|
65
75
|
regions: [es_mu]
|
66
76
|
mday: 9
|
77
|
+
observed: to_monday_if_sunday
|
67
78
|
- name: Día de La Rioja
|
68
79
|
regions: [es_lo]
|
69
80
|
mday: 9
|
81
|
+
observed: to_monday_if_sunday
|
70
82
|
7:
|
71
83
|
- name: Santiago Apostol
|
72
84
|
regions: [es_ga]
|
73
85
|
mday: 23
|
74
|
-
|
86
|
+
observed: to_monday_if_sunday
|
87
|
+
8:
|
75
88
|
- name: Asunción
|
76
89
|
regions: [es]
|
77
90
|
mday: 15
|
91
|
+
observed: to_monday_if_sunday
|
78
92
|
9:
|
79
93
|
- name: Día de Ceuta
|
80
94
|
regions: [es_ce]
|
81
95
|
mday: 2
|
96
|
+
observed: to_monday_if_sunday
|
82
97
|
- name: Día de Asturias
|
83
98
|
regions: [es_o]
|
84
99
|
mday: 8
|
100
|
+
observed: to_monday_if_sunday
|
85
101
|
- name: Día de Extremadura
|
86
102
|
regions: [es_ex]
|
87
103
|
mday: 8
|
88
104
|
- name: Fiesta Nacional de Cataluña
|
89
105
|
regions: [es_ct]
|
90
106
|
mday: 11
|
91
|
-
|
107
|
+
observed: to_monday_if_sunday
|
108
|
+
10:
|
92
109
|
- name: Día de Valencia
|
93
110
|
regions: [es_vc, es_v]
|
94
111
|
mday: 9
|
112
|
+
observed: to_monday_if_sunday
|
95
113
|
- name: Día de la Hispanidad
|
96
114
|
regions: [es]
|
97
115
|
mday: 12
|
98
|
-
|
116
|
+
observed: to_monday_if_sunday
|
117
|
+
11:
|
99
118
|
- name: Todos los Santos
|
100
119
|
regions: [es]
|
101
120
|
mday: 1
|
102
|
-
|
121
|
+
observed: to_monday_if_sunday
|
122
|
+
12:
|
103
123
|
- name: Día de la Constitución
|
104
124
|
regions: [es]
|
105
|
-
mday: 6
|
125
|
+
mday: 6
|
126
|
+
observed: to_monday_if_sunday
|
106
127
|
- name: Inmaculada Concepción
|
107
128
|
regions: [es]
|
108
129
|
mday: 8
|
130
|
+
observed: to_monday_if_sunday
|
109
131
|
- name: Navidad del Señor
|
110
132
|
regions: [es]
|
111
133
|
mday: 25
|
134
|
+
observed: to_monday_if_sunday
|
112
135
|
- name: San Esteban
|
113
136
|
regions: [es_ib, es_ct]
|
114
137
|
mday: 26
|
138
|
+
observed: to_monday_if_sunday
|
115
139
|
tests: |
|
116
|
-
{Date.civil(2009,1,1) => 'Año Nuevo',
|
117
|
-
Date.civil(2009,1,6) => 'Día de Reyes',
|
140
|
+
{Date.civil(2009,1,1) => 'Año Nuevo',
|
141
|
+
Date.civil(2009,1,6) => 'Día de Reyes',
|
118
142
|
Date.civil(2009,4,10) => 'Viernes Santo',
|
119
143
|
Date.civil(2009,5,1) => 'Día del Trabajador',
|
120
144
|
Date.civil(2009,8,15) => 'Asunción',
|
@@ -125,12 +149,14 @@ tests: |
|
|
125
149
|
Date.civil(2009,12,25) => 'Navidad del Señor'}.each do |date, name|
|
126
150
|
assert_equal name, (Holidays.on(date, :es, :informal)[0] || {})[:name]
|
127
151
|
end
|
128
|
-
|
152
|
+
|
129
153
|
[:es_pv, :es_ct, :es_na, :es_v, :es_vc, :es_].each do |r|
|
130
154
|
assert_equal 'Jueves Santo', Date.civil(2009,4,9).holidays(r)[0][:name]
|
131
155
|
assert_equal 'Lunes de Pascua', Date.civil(2009,4,13).holidays(r)[0][:name]
|
132
156
|
end
|
133
|
-
|
157
|
+
|
158
|
+
assert_equal 'Jueves Santo', Date.civil(2009,4,9).holidays(:es_an)[0][:name]
|
159
|
+
|
134
160
|
[:es_v, :es_vc, :es_cm, :es_mu, :es_m, :es_].each do |r|
|
135
161
|
assert_equal 'San José', Date.civil(2009,3,19).holidays(r)[0][:name]
|
136
162
|
end
|
@@ -147,6 +173,8 @@ tests: |
|
|
147
173
|
assert_equal 'San Esteban', Date.civil(2009,12,26).holidays(r)[0][:name]
|
148
174
|
end
|
149
175
|
|
176
|
+
assert_equal 'Año Nuevo', Date.civil(2012,1,1).holidays(:es)[0][:name]
|
177
|
+
assert_equal 'Año Nuevo', Date.civil(2012,1,2).holidays(:es, :observed)[0][:name]
|
150
178
|
assert_equal 'Día de Andalucía', Date.civil(2009,2,28).holidays(:es_an)[0][:name]
|
151
179
|
assert_equal 'Día de las Islas Baleares', Date.civil(2009,3,1).holidays(:es_ib)[0][:name]
|
152
180
|
assert_equal 'Fiesta de la Comunidad', Date.civil(2006,5,2).holidays(:es_m)[0][:name]
|
@@ -158,4 +186,4 @@ tests: |
|
|
158
186
|
assert_equal 'Día de Ceuta', Date.civil(2009,9,2).holidays(:es_ce)[0][:name]
|
159
187
|
assert_equal 'Día de Asturias', Date.civil(2009,9,8).holidays(:es_o)[0][:name]
|
160
188
|
assert_equal 'Día de Extremadura', Date.civil(2009,9,8).holidays(:es_ex)[0][:name]
|
161
|
-
assert_equal 'Fiesta Nacional de Cataluña', Date.civil(2009,9,11).holidays(:es_ct)[0][:name]
|
189
|
+
assert_equal 'Fiesta Nacional de Cataluña', Date.civil(2009,9,11).holidays(:es_ct)[0][:name]
|
data/data/fr.yaml
CHANGED
@@ -4,12 +4,13 @@
|
|
4
4
|
# Sources:
|
5
5
|
# - http://fr.wikipedia.org/wiki/Jours_f%C3%A9ri%C3%A9s_en_France#Les_f.C3.AAtes_f.C3.A9ri.C3.A9es
|
6
6
|
# - http://vosdroits.service-public.fr/particuliers/F2405.xhtml
|
7
|
-
---
|
7
|
+
---
|
8
8
|
months:
|
9
|
-
0:
|
9
|
+
0:
|
10
10
|
- name: Pâques
|
11
11
|
regions: [fr]
|
12
12
|
function: easter(year)
|
13
|
+
type: informal
|
13
14
|
- name: Lundi de Pâques
|
14
15
|
regions: [fr]
|
15
16
|
function: easter(year)+1
|
@@ -19,14 +20,15 @@ months:
|
|
19
20
|
- name: Pentecôte
|
20
21
|
regions: [fr]
|
21
22
|
function: easter(year)+49
|
23
|
+
type: informal
|
22
24
|
- name: Lundi de Pentecôte
|
23
25
|
regions: [fr]
|
24
26
|
function: easter(year)+50
|
25
|
-
1:
|
27
|
+
1:
|
26
28
|
- name: Jour de l'an
|
27
29
|
regions: [fr]
|
28
30
|
mday: 1
|
29
|
-
5:
|
31
|
+
5:
|
30
32
|
- name: Fête du travail
|
31
33
|
regions: [fr]
|
32
34
|
mday: 1
|
@@ -37,11 +39,11 @@ months:
|
|
37
39
|
- name: Fête nationale
|
38
40
|
regions: [fr]
|
39
41
|
mday: 14
|
40
|
-
8:
|
42
|
+
8:
|
41
43
|
- name: Assomption
|
42
44
|
regions: [fr]
|
43
45
|
mday: 15
|
44
|
-
11:
|
46
|
+
11:
|
45
47
|
- name: Toussaint
|
46
48
|
regions: [fr]
|
47
49
|
mday: 1
|
@@ -53,18 +55,21 @@ months:
|
|
53
55
|
regions: [fr]
|
54
56
|
mday: 25
|
55
57
|
tests: |
|
56
|
-
{Date.civil(2007,1,1) => 'Jour de l\'an',
|
57
|
-
Date.civil(2007,4,8) => 'Pâques',
|
58
|
+
{Date.civil(2007,1,1) => 'Jour de l\'an',
|
58
59
|
Date.civil(2007,4,9) => 'Lundi de Pâques',
|
59
60
|
Date.civil(2007,5,1) => 'Fête du travail',
|
60
61
|
Date.civil(2007,5,8) => 'Victoire 1945',
|
61
62
|
Date.civil(2007,5,17) => 'Ascension',
|
62
|
-
Date.civil(2007,5,27) => 'Pentecôte',
|
63
63
|
Date.civil(2007,5,28) => 'Lundi de Pentecôte',
|
64
64
|
Date.civil(2007,7,14) => 'Fête nationale',
|
65
65
|
Date.civil(2007,8,15) => 'Assomption',
|
66
66
|
Date.civil(2007,11,1) => 'Toussaint',
|
67
67
|
Date.civil(2007,11,11) => 'Armistice 1918',
|
68
68
|
Date.civil(2007,12,25) => 'Noël'}.each do |date, name|
|
69
|
+
assert_equal name, (Holidays.on(date, :fr)[0] || {})[:name]
|
70
|
+
end
|
71
|
+
{Date.civil(2007,4,8) => 'Pâques',
|
72
|
+
Date.civil(2007,5,27) => 'Pentecôte'}.each do |date, name|
|
73
|
+
assert_nil (Holidays.on(date, :fr)[0] || {})[:name]
|
69
74
|
assert_equal name, (Holidays.on(date, :fr, :informal)[0] || {})[:name]
|
70
|
-
end
|
75
|
+
end
|
data/data/gb.yaml
CHANGED
@@ -27,9 +27,10 @@ months:
|
|
27
27
|
regions: [gb]
|
28
28
|
mday: 1
|
29
29
|
observed: to_monday_if_weekend
|
30
|
-
- name:
|
30
|
+
- name: 2nd January
|
31
31
|
regions: [gb_sct]
|
32
32
|
mday: 2
|
33
|
+
observed: to_weekday_if_boxing_weekend
|
33
34
|
3:
|
34
35
|
- name: St. Piran's Day
|
35
36
|
regions: [gb_con]
|
@@ -70,6 +71,11 @@ months:
|
|
70
71
|
regions: [gb]
|
71
72
|
mday: 5
|
72
73
|
type: informal
|
74
|
+
- name: St. Andrew's Day
|
75
|
+
regions: [gb_sct]
|
76
|
+
mday: 30
|
77
|
+
type: informal
|
78
|
+
observed: to_monday_if_weekend
|
73
79
|
12:
|
74
80
|
- name: Christmas Day
|
75
81
|
regions: [gb]
|
@@ -91,6 +97,7 @@ tests: |
|
|
91
97
|
end
|
92
98
|
|
93
99
|
assert_equal 'St. Patrick\'s Day', Date.civil(2008,3,17).holidays(:gb_nir, :informal)[0][:name]
|
100
|
+
assert_equal 'St. Andrew\'s Day', Date.civil(2008,11,30).holidays(:gb_sct, :informal)[0][:name]
|
94
101
|
|
95
102
|
assert_equal 'Christmas Day', Date.civil(2008,12,25).holidays(:gb_, :observed)[0][:name]
|
96
103
|
assert_equal 'Christmas Day', Date.civil(2009,12,25).holidays(:gb_, :observed)[0][:name]
|
@@ -105,6 +112,12 @@ tests: |
|
|
105
112
|
assert_equal 'New Year\'s Day', Date.civil(2011,1,3).holidays(:gb, :observed)[0][:name]
|
106
113
|
assert_equal 'New Year\'s Day', Date.civil(2012,1,2).holidays(:gb, :observed)[0][:name]
|
107
114
|
|
115
|
+
assert_equal '2nd January', Date.civil(2010,1,4).holidays(:gb_sct, :observed)[0][:name]
|
116
|
+
assert_equal '2nd January', Date.civil(2011,1,4).holidays(:gb_sct, :observed)[0][:name]
|
117
|
+
assert_equal '2nd January', Date.civil(2012,1,3).holidays(:gb_sct, :observed)[0][:name]
|
118
|
+
assert_equal '2nd January', Date.civil(2013,1,2).holidays(:gb_sct, :observed)[0][:name]
|
119
|
+
assert_equal '2nd January', Date.civil(2014,1,2).holidays(:gb_sct, :observed)[0][:name]
|
120
|
+
|
108
121
|
[:gb_wls, :gb_eng, :gb_nir, :gb_eaw, :gb_].each do |r|
|
109
122
|
assert_equal 'Easter Monday', Date.civil(2008,3,24).holidays(r)[0][:name]
|
110
123
|
assert_equal 'Bank Holiday', Date.civil(2008,8,25).holidays(r)[0][:name]
|
data/data/index.yaml
CHANGED
@@ -8,9 +8,11 @@ defs:
|
|
8
8
|
BR: ['br.yaml']
|
9
9
|
CA: ['ca.yaml', 'north_america_informal.yaml']
|
10
10
|
CH: ['ch.yaml']
|
11
|
+
CL: ['cl.yaml']
|
11
12
|
CZ: ['cz.yaml']
|
12
13
|
DK: ['dk.yaml']
|
13
14
|
DE: ['de.yaml']
|
15
|
+
ECB_TARGET: ['ecb_target.yaml']
|
14
16
|
EL: ['el.yaml']
|
15
17
|
ES: ['es.yaml']
|
16
18
|
Federal_Reserve: ['federal_reserve.yaml']
|
@@ -23,6 +25,7 @@ defs:
|
|
23
25
|
IS: ['is.yaml']
|
24
26
|
IT: ['it.yaml']
|
25
27
|
LI: ['li.yaml']
|
28
|
+
LT: ['lt.yaml']
|
26
29
|
MA: ['ma.yaml']
|
27
30
|
MX: ['mx.yaml', 'north_america_informal.yaml']
|
28
31
|
NERC: ['nerc.yaml']
|
@@ -40,7 +43,10 @@ defs:
|
|
40
43
|
ZA: ['za.yaml']
|
41
44
|
North_America: ['ca.yaml', 'mx.yaml', 'us.yaml', 'north_america_informal.yaml']
|
42
45
|
Scandinavia: ['dk.yaml', 'is.yaml', 'no.yaml', 'se.yaml', 'fi.yaml']
|
43
|
-
Europe: ['at.yaml', 'be.yaml', 'ch.yaml', 'cz.yaml', 'dk.yaml', 'de.yaml', 'el.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'hr.yaml', 'hu.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'li.yaml', 'nl.yaml', 'no.yaml', 'pl.yaml', 'pt.yaml', 'ro.yaml', 'sk.yaml']
|
46
|
+
Europe: ['at.yaml', 'be.yaml', 'ch.yaml', 'cz.yaml', 'dk.yaml', 'de.yaml', 'el.yaml', 'es.yaml', 'fr.yaml', 'gb.yaml', 'hr.yaml', 'hu.yaml', 'ie.yaml', 'is.yaml', 'it.yaml', 'li.yaml', 'lt.yaml', 'nl.yaml', 'no.yaml', 'pl.yaml', 'pt.yaml', 'ro.yaml', 'sk.yaml', 'si.yaml']
|
44
47
|
JP: ['jp.yaml']
|
45
48
|
VE: ['ve.yaml']
|
49
|
+
VI: ['vi.yaml']
|
46
50
|
SK: ['sk.yaml']
|
51
|
+
SI: ['si.yaml']
|
52
|
+
SG: ['sg.yaml']
|
data/data/lt.yaml
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Lithuanian holiday definitions for the Ruby Holiday gem.
|
2
|
+
#
|
3
|
+
# Updated: 2014-10-02
|
4
|
+
# Sources:
|
5
|
+
# - http://en.wikipedia.org/wiki/Public_holidays_in_Lithuania
|
6
|
+
# - http://day.lt/sventes/nedarbo
|
7
|
+
---
|
8
|
+
months:
|
9
|
+
0:
|
10
|
+
- name: Šv. Velykos
|
11
|
+
regions: [lt]
|
12
|
+
function: easter(year)
|
13
|
+
- name: Antroji Velykų diena
|
14
|
+
regions: [lt]
|
15
|
+
function: easter(year)+1
|
16
|
+
1:
|
17
|
+
- name: Naujieji metai
|
18
|
+
regions: [lt]
|
19
|
+
mday: 1
|
20
|
+
2:
|
21
|
+
- name: Valstybės atkūrimo diena
|
22
|
+
regions: [lt]
|
23
|
+
mday: 16
|
24
|
+
3:
|
25
|
+
- name: Nepriklausomybės atkūrimo diena
|
26
|
+
regions: [lt]
|
27
|
+
mday: 11
|
28
|
+
5:
|
29
|
+
- name: Darbininkų diena
|
30
|
+
regions: [lt]
|
31
|
+
mday: 1
|
32
|
+
6:
|
33
|
+
- name: Joninės
|
34
|
+
regions: [lt]
|
35
|
+
mday: 24
|
36
|
+
7:
|
37
|
+
- name: Valstybės diena
|
38
|
+
regions: [lt]
|
39
|
+
mday: 6
|
40
|
+
8:
|
41
|
+
- name: Žolinė
|
42
|
+
regions: [lt]
|
43
|
+
mday: 15
|
44
|
+
11:
|
45
|
+
- name: Visų šventųjų diena
|
46
|
+
regions: [lt]
|
47
|
+
mday: 1
|
48
|
+
12:
|
49
|
+
- name: Šv. Kūčios
|
50
|
+
regions: [lt]
|
51
|
+
mday: 24
|
52
|
+
- name: Šv. Kalėdos
|
53
|
+
regions: [lt]
|
54
|
+
mday: 25
|
55
|
+
- name: Antroji Kalėdų diena
|
56
|
+
regions: [lt]
|
57
|
+
mday: 26
|
58
|
+
tests: |
|
59
|
+
{Date.civil(2008,1,1) => 'Naujieji metai',
|
60
|
+
Date.civil(2008,2,16) => 'Valstybės atkūrimo diena',
|
61
|
+
Date.civil(2008,3,11) => 'Nepriklausomybės atkūrimo diena',
|
62
|
+
Date.civil(2008,3,23) => 'Šv. Velykos',
|
63
|
+
Date.civil(2008,3,24) => 'Antroji Velykų diena',
|
64
|
+
Date.civil(2008,5,1) => 'Darbininkų diena',
|
65
|
+
Date.civil(2008,6,24) => 'Joninės',
|
66
|
+
Date.civil(2008,7,6) => 'Valstybės diena',
|
67
|
+
Date.civil(2008,8,15) => 'Žolinė',
|
68
|
+
Date.civil(2008,11,1) => 'Visų šventųjų diena',
|
69
|
+
Date.civil(2008,12,24) => 'Šv. Kūčios',
|
70
|
+
Date.civil(2008,12,25) => 'Šv. Kalėdos',
|
71
|
+
Date.civil(2008,12,26) => 'Antroji Kalėdų diena'}.each do |date, name|
|
72
|
+
assert_equal name, (Holidays.on(date, :lt)[0] || {})[:name]
|
73
|
+
end
|
74
|
+
{Date.civil(2012,1,1) => 'Naujieji metai',
|
75
|
+
Date.civil(2012,2,16) => 'Valstybės atkūrimo diena',
|
76
|
+
Date.civil(2012,3,11) => 'Nepriklausomybės atkūrimo diena',
|
77
|
+
Date.civil(2012,4,8) => 'Šv. Velykos',
|
78
|
+
Date.civil(2012,4,9) => 'Antroji Velykų diena',
|
79
|
+
Date.civil(2012,5,1) => 'Darbininkų diena',
|
80
|
+
Date.civil(2012,6,24) => 'Joninės',
|
81
|
+
Date.civil(2012,7,6) => 'Valstybės diena',
|
82
|
+
Date.civil(2012,8,15) => 'Žolinė',
|
83
|
+
Date.civil(2012,11,1) => 'Visų šventųjų diena',
|
84
|
+
Date.civil(2012,12,24) => 'Šv. Kūčios',
|
85
|
+
Date.civil(2012,12,25) => 'Šv. Kalėdos',
|
86
|
+
Date.civil(2012,12,26) => 'Antroji Kalėdų diena'}.each do |date, name|
|
87
|
+
assert_equal name, (Holidays.on(date, :lt)[0] || {})[:name]
|
88
|
+
end
|