holidays 4.7.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +3 -0
  3. data/CHANGELOG.md +9 -0
  4. data/CONTRIBUTING.md +21 -11
  5. data/Makefile +9 -6
  6. data/holidays.gemspec +1 -1
  7. data/lib/generated_definitions/MANIFEST +1 -0
  8. data/lib/generated_definitions/REGIONS.rb +1 -1
  9. data/lib/generated_definitions/hk.rb +112 -0
  10. data/lib/generated_definitions/kr.rb +4 -4
  11. data/lib/holidays/errors.rb +1 -0
  12. data/lib/holidays/finder/context/parse_options.rb +8 -3
  13. data/lib/holidays/load_all_definitions.rb +0 -11
  14. data/lib/holidays/version.rb +1 -1
  15. data/test/defs/test_defs_hk.rb +38 -0
  16. data/test/defs/test_defs_jp.rb +1 -0
  17. data/test/defs/test_defs_kr.rb +1 -1
  18. data/test/holidays/definition/validator/test_region.rb +4 -0
  19. data/test/holidays/finder/context/test_parse_options.rb +9 -1
  20. data/test/integration/test_all_regions.rb +4 -4
  21. data/test/integration/test_custom_holidays.rb +4 -4
  22. data/test/integration/test_holidays.rb +6 -6
  23. metadata +6 -60
  24. data/definitions/README.md +0 -353
  25. data/definitions/ar.yaml +0 -93
  26. data/definitions/at.yaml +0 -72
  27. data/definitions/au.yaml +0 -378
  28. data/definitions/be_fr.yaml +0 -69
  29. data/definitions/be_nl.yaml +0 -69
  30. data/definitions/bg.yaml +0 -127
  31. data/definitions/br.yaml +0 -77
  32. data/definitions/ca.yaml +0 -317
  33. data/definitions/ch.yaml +0 -193
  34. data/definitions/cl.yaml +0 -94
  35. data/definitions/cr.yaml +0 -65
  36. data/definitions/cz.yaml +0 -73
  37. data/definitions/de.yaml +0 -209
  38. data/definitions/dk.yaml +0 -130
  39. data/definitions/ecb_target.yaml +0 -44
  40. data/definitions/el.yaml +0 -84
  41. data/definitions/es.yaml +0 -203
  42. data/definitions/federal_reserve.yaml +0 -114
  43. data/definitions/fedex.yaml +0 -62
  44. data/definitions/fi.yaml +0 -115
  45. data/definitions/fr.yaml +0 -79
  46. data/definitions/gb.yaml +0 -151
  47. data/definitions/hr.yaml +0 -79
  48. data/definitions/hu.yaml +0 -63
  49. data/definitions/ie.yaml +0 -89
  50. data/definitions/index.yaml +0 -61
  51. data/definitions/is.yaml +0 -146
  52. data/definitions/it.yaml +0 -67
  53. data/definitions/jp.yaml +0 -321
  54. data/definitions/kr.yaml +0 -282
  55. data/definitions/li.yaml +0 -107
  56. data/definitions/lt.yaml +0 -89
  57. data/definitions/lu.yaml +0 -56
  58. data/definitions/ma.yaml +0 -52
  59. data/definitions/mx.yaml +0 -106
  60. data/definitions/my.yaml +0 -51
  61. data/definitions/nerc.yaml +0 -51
  62. data/definitions/nl.yaml +0 -73
  63. data/definitions/no.yaml +0 -90
  64. data/definitions/north_america_informal.yaml +0 -61
  65. data/definitions/nyse.yaml +0 -64
  66. data/definitions/nz.yaml +0 -163
  67. data/definitions/pe.yaml +0 -119
  68. data/definitions/ph.yaml +0 -94
  69. data/definitions/pl.yaml +0 -320
  70. data/definitions/pt.yaml +0 -89
  71. data/definitions/ro.yaml +0 -78
  72. data/definitions/se.yaml +0 -120
  73. data/definitions/sg.yaml +0 -56
  74. data/definitions/si.yaml +0 -86
  75. data/definitions/sk.yaml +0 -80
  76. data/definitions/united_nations.yaml +0 -189
  77. data/definitions/ups.yaml +0 -62
  78. data/definitions/us.yaml +0 -103
  79. data/definitions/ve.yaml +0 -74
  80. data/definitions/vi.yaml +0 -29
  81. data/definitions/za.yaml +0 -80
@@ -1,119 +0,0 @@
1
- # Peruvian holiday definitions for the Ruby Holiday gem.
2
- #
3
- # created: 2016-06-18.
4
- # updated: 2016-06-18.
5
- #
6
- # Sources:
7
- # - http://www.timeanddate.com/holidays/peru/
8
- # - https://en.wikipedia.org/wiki/Public_holidays_in_Peru
9
- #
10
- # Avoided days:
11
- # March equinox
12
- # June Solstice
13
- # September equinox
14
- # All soul's day
15
- # December solstice
16
- # Christmas eve
17
- # Christmas day observed
18
- # New year's eve
19
- #
20
- months:
21
- 0:
22
- - name: Jueves Santo
23
- regions: [pe]
24
- function: easter(year)
25
- function_modifier: -3
26
- - name: Viernes Santo
27
- regions: [pe]
28
- function: easter(year)
29
- function_modifier: -2
30
- - name: Pascua
31
- regions: [pe]
32
- function: easter(year)
33
- 1:
34
- - name: Año Nuevo
35
- regions: [pe]
36
- mday: 1
37
- - name: Día de los Reyes Magos
38
- regions: [pe]
39
- mday: 6
40
- observed: to_monday_if_sunday(date)
41
- 5:
42
- - name: Día del Trabajador
43
- regions: [pe]
44
- mday: 1
45
- - name: Día de la Madre
46
- regions: [pe]
47
- week: 2
48
- wday: 0
49
- type: informal
50
- 6:
51
- - name: Día de la Bandera
52
- regions: [pe]
53
- mday: 7
54
- type: informal
55
- - name: Día del Padre
56
- regions: [pe]
57
- week: 3
58
- wday: 0
59
- type: informal
60
- - name: Inti Raymi
61
- regions: [pe]
62
- mday: 24
63
- type: informal
64
- - name: San Pablo y San Pedro
65
- regions: [pe]
66
- mday: 29
67
- 7:
68
- - name: Primer Día de la Independencia
69
- regions: [pe]
70
- mday: 28
71
- - name: Segundo Día de la Independencia
72
- regions: [pe]
73
- mday: 29
74
- 8:
75
- - name: Santa Rosa de Lima
76
- regions: [pe]
77
- mday: 30
78
- 9:
79
- - name: Día de las Fuerzas Armadas
80
- regions: [pe]
81
- mday: 24
82
- type: informal
83
- 10:
84
- - name: Batalla de Angamos
85
- regions: [pe]
86
- mday: 8
87
- 11:
88
- - name: Todos los Santos
89
- regions: [pe]
90
- mday: 1
91
- 12:
92
- - name: Inmaculada Concepción
93
- regions: [pe]
94
- mday: 8
95
- observed: to_monday_if_sunday(date)
96
- - name: Navidad del Señor
97
- regions: [pe]
98
- mday: 25
99
- tests: |
100
- {Date.civil(2016,1,1) => 'Año Nuevo',
101
- Date.civil(2016,1,6) => 'Día de los Reyes Magos',
102
- Date.civil(2016,3,24) => 'Jueves Santo',
103
- Date.civil(2016,3,25) => 'Viernes Santo',
104
- Date.civil(2016,3,27) => 'Pascua',
105
- Date.civil(2016,5,1) => 'Día del Trabajador',
106
- Date.civil(2016,5,8) => 'Día de la Madre',
107
- Date.civil(2016,6,7) => 'Día de la Bandera',
108
- Date.civil(2016,6,19) => 'Día del Padre',
109
- Date.civil(2016,6,29) => 'San Pablo y San Pedro',
110
- Date.civil(2016,7,28) => 'Primer Día de la Independencia',
111
- Date.civil(2016,7,29) => 'Segundo Día de la Independencia',
112
- Date.civil(2016,8,30) => 'Santa Rosa de Lima',
113
- Date.civil(2016,9,24) => 'Día de las Fuerzas Armadas',
114
- Date.civil(2016,10,8) => 'Batalla de Angamos',
115
- Date.civil(2016,11,1) => 'Todos los Santos',
116
- Date.civil(2016,12,8) => 'Inmaculada Concepción',
117
- Date.civil(2016,12,25) => 'Navidad del Señor'}.each do |date, name|
118
- assert_equal name, (Holidays.on(date, :pe, :informal)[0] || {})[:name]
119
- end
@@ -1,94 +0,0 @@
1
- # Philippines holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2015-03-25 by itsmechlark
4
- # Sources:
5
- # - http://www.gov.ph/2014/07/23/list-of-nationwide-holidays-for-2015/
6
- # - http://www.timeanddate.com/holidays/philippines/
7
- ---
8
- months:
9
- 0:
10
- - name: Maundy Thursday
11
- regions: [ph]
12
- function: easter(year)
13
- function_modifier: -3
14
- - name: Good Friday
15
- regions: [ph]
16
- function: easter(year)
17
- function_modifier: -2
18
- - name: Holy Saturday
19
- regions: [ph]
20
- function: easter(year)
21
- function_modifier: -1
22
- - name: Easter Sunday
23
- regions: [ph]
24
- function: easter(year)
25
- 1:
26
- - name: New Year’s Day
27
- regions: [ph]
28
- mday: 1
29
- 2:
30
- - name: People Power Anniversary
31
- regions: [ph]
32
- mday: 25
33
- 4:
34
- - name: The Day of Valor
35
- regions: [ph]
36
- mday: 9
37
- 5:
38
- - name: Labor Day
39
- regions: [ph]
40
- mday: 1
41
- 6:
42
- - name: Independence Day
43
- regions: [ph]
44
- mday: 12
45
- 8:
46
- - name: Ninoy Aquino Day
47
- regions: [ph]
48
- mday: 21
49
- - name: National Heroes Day
50
- regions: [ph]
51
- function: ph_heroes_day(year)
52
- 11:
53
- - name: All Saints Day
54
- regions: [ph]
55
- mday: 1
56
- - name: Bonifacio Day
57
- regions: [ph]
58
- mday: 30
59
- 12:
60
- - name: Christmas Day
61
- regions: [ph]
62
- mday: 25
63
- - name: Rizal Day
64
- regions: [ph]
65
- mday: 30
66
- - name: New Year's Eve
67
- regions: [ph]
68
- mday: 31
69
- methods:
70
- ph_heroes_day:
71
- # last Monday of August
72
- arguments: year
73
- source: |
74
- date = Date.new(year, 8, -1)
75
-
76
- if date.wday != 1
77
- date -= date.wday - 1
78
- end
79
-
80
- date
81
- tests: |
82
- {Date.civil(2015,2,25) => 'People Power Anniversary',
83
- Date.civil(2015,4,3) => 'Good Friday',
84
- Date.civil(2015,4,9) => 'The Day of Valor',
85
- Date.civil(2015,5,1) => 'Labor Day',
86
- Date.civil(2015,6,12) => 'Independence Day',
87
- Date.civil(2015,8,21) => 'Ninoy Aquino Day',
88
- Date.civil(2015,8,31) => 'National Heroes Day',
89
- Date.civil(2015,11,1) => 'All Saints Day',
90
- Date.civil(2015,11,30) => 'Bonifacio Day',
91
- Date.civil(2015,12,25) => 'Christmas Day',
92
- Date.civil(2015,12,30) => 'Rizal Day'}.each do |date, name|
93
- assert_equal name, (Holidays.on(date, :ph)[0] || {})[:name]
94
- end
@@ -1,320 +0,0 @@
1
- # Poland holiday definitions for the Ruby Holiday gem.
2
- #
3
- # Updated: 2011-09-12.
4
- # Source: http://pl.wikipedia.org/wiki/Dni_wolne_od_pracy_w_Polsce
5
- ---
6
- months:
7
- 0:
8
- - name: Tłusty Czwartek
9
- regions: [pl]
10
- function: easter(year)
11
- function_modifier: -52
12
- type: informal
13
- - name: Ostatki
14
- regions: [pl]
15
- function: easter(year)
16
- function_modifier: -47
17
- type: informal
18
- - name: Środa Popielcowa
19
- regions: [pl]
20
- function: easter(year)
21
- function_modifier: -46
22
- type: informal
23
- - name: Niedziela Palmowa
24
- regions: [pl]
25
- function: easter(year)
26
- function_modifier: -7
27
- type: informal
28
- - name: Wielki Czwartek
29
- regions: [pl]
30
- function: easter(year)
31
- function_modifier: -3
32
- type: informal
33
- - name: Wielki Piątek
34
- regions: [pl]
35
- function: easter(year)
36
- function_modifier: -2
37
- type: informal
38
- - name: Wielka Sobota
39
- regions: [pl]
40
- function: easter(year)
41
- function_modifier: -1
42
- type: informal
43
- - name: Niedziela Wielkanocna
44
- regions: [pl]
45
- function: easter(year)
46
- - name: Poniedziałek Wielkanocny (Lany Poniedziałek)
47
- regions: [pl]
48
- function: easter(year)
49
- function_modifier: 1
50
- - name: Zesłanie Ducha Świętego (Zielone Świątki)
51
- regions: [pl]
52
- function: easter(year)
53
- function_modifier: 49
54
- - name: Uroczystość Najświętszego Ciała i Krwi Pańskiej (Boże Ciało)
55
- regions: [pl]
56
- function: easter(year)
57
- function_modifier: 60
58
- 1:
59
- - name: Nowy Rok
60
- regions: [pl]
61
- mday: 1
62
- - name: Objawienie Pańskie (święto Trzech Króli)
63
- regions: [pl]
64
- function: pl_trzech_kroli(year)
65
- - name: Objawienie Pańskie (święto Trzech Króli)
66
- regions: [pl]
67
- function: pl_trzech_kroli_informal(year)
68
- type: informal
69
- - name: Dzień Babci
70
- regions: [pl]
71
- mday: 21
72
- type: informal
73
- - name: Dzień Dziadka
74
- regions: [pl]
75
- mday: 22
76
- type: informal
77
- 2:
78
- - name: Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)
79
- regions: [pl]
80
- mday: 2
81
- type: informal
82
- - name: Dzień Zakochanych (Walentynki)
83
- regions: [pl]
84
- mday: 14
85
- type: informal
86
- 3:
87
- - name: Dzień Kobiet
88
- regions: [pl]
89
- mday: 8
90
- type: informal
91
- - name: Dzień Mężczyzn
92
- regions: [pl]
93
- mday: 10
94
- type: informal
95
- 4:
96
- - name: Prima Aprilis
97
- regions: [pl]
98
- mday: 1
99
- type: informal
100
- - name: Międzynarodowy Dzień Ziemi
101
- regions: [pl]
102
- mday: 22
103
- type: informal
104
- 5:
105
- - name: Święto Państwowe (Święto Pracy)
106
- regions: [pl]
107
- mday: 1
108
- - name: Dzień Flagi Rzeczpospolitej Polskiej
109
- regions: [pl]
110
- mday: 2
111
- type: informal
112
- - name: Święto Narodowe Trzeciego Maja
113
- regions: [pl]
114
- mday: 3
115
- 6:
116
- - name: Dzień Ojca
117
- regions: [pl]
118
- mday: 23
119
- type: informal
120
- 8:
121
- - name: Wniebowzięcie Najświętszej Maryi Panny
122
- regions: [pl]
123
- mday: 15
124
- - name: Święto Wojska Polskiego
125
- regions: [pl]
126
- mday: 15
127
- 9:
128
- - name: Dzień Chłopaka
129
- regions: [pl]
130
- mday: 30
131
- type: informal
132
- 10:
133
- - name: Dzień Nauczyciela (Dzień Edukacji Narodowej)
134
- regions: [pl]
135
- mday: 14
136
- type: informal
137
- 11:
138
- - name: Wszystkich Świętych
139
- regions: [pl]
140
- mday: 1
141
- - name: Dzień Zaduszny
142
- regions: [pl]
143
- mday: 2
144
- type: informal
145
- - name: Narodowe Święto Niepodległości
146
- regions: [pl]
147
- mday: 11
148
- - name: Andrzejki
149
- regions: [pl]
150
- mday: 29
151
- type: informal
152
- 12:
153
- - name: Barbórka (Dzień Górnika, Naftowca i Gazownika)
154
- regions: [pl]
155
- mday: 4
156
- type: informal
157
- - name: Mikołajki
158
- regions: [pl]
159
- mday: 6
160
- type: informal
161
- - name: Wigilia Bożego Narodzenia
162
- regions: [pl]
163
- mday: 24
164
- type: informal
165
- - name: pierwszy dzień Bożego Narodzenia
166
- regions: [pl]
167
- mday: 25
168
- - name: drugi dzień Bożego Narodzenia
169
- regions: [pl]
170
- mday: 26
171
- - name: Sylwester
172
- regions: [pl]
173
- mday: 31
174
- type: informal
175
- methods:
176
- pl_trzech_kroli:
177
- # Poland: January 6 is holiday since 2011
178
- arguments: year
179
- source: |
180
- year >= 2011 ? 6 : nil
181
- pl_trzech_kroli_informal:
182
- # Poland: January 6 wasn't holiday before 2011
183
- arguments: year
184
- source: |
185
- year < 2011 ? 6 : nil
186
- tests: |
187
- {Date.civil(2011,1,1) => 'Nowy Rok',
188
- Date.civil(2011,5,1) => 'Święto Państwowe (Święto Pracy)',
189
- Date.civil(2011,5,3) => 'Święto Narodowe Trzeciego Maja',
190
- Date.civil(2011,11,1) => 'Wszystkich Świętych',
191
- Date.civil(2011,11,11) => 'Narodowe Święto Niepodległości',
192
- Date.civil(2011,12,25) => 'pierwszy dzień Bożego Narodzenia',
193
- Date.civil(2011,12,26) => 'drugi dzień Bożego Narodzenia'}.each do |date, name|
194
- assert_equal name, (Holidays.on(date, :pl)[0] || {})[:name]
195
- end
196
-
197
- # informal
198
- {Date.civil(2011,1,21) => 'Dzień Babci',
199
- Date.civil(2011,1,22) => 'Dzień Dziadka',
200
- Date.civil(2011,2,2) => 'Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)',
201
- Date.civil(2011,2,14) => 'Dzień Zakochanych (Walentynki)',
202
- Date.civil(2010,3,8) => 'Dzień Kobiet',
203
- Date.civil(2011,3,10) => 'Dzień Mężczyzn',
204
- Date.civil(2011,4,1) => 'Prima Aprilis',
205
- Date.civil(2010,4,22) => 'Międzynarodowy Dzień Ziemi',
206
- Date.civil(2011,5,2) => 'Dzień Flagi Rzeczpospolitej Polskiej',
207
- Date.civil(2010,6,23) => 'Dzień Ojca',
208
- Date.civil(2011,9,30) => 'Dzień Chłopaka',
209
- Date.civil(2011,10,14) => 'Dzień Nauczyciela (Dzień Edukacji Narodowej)',
210
- Date.civil(2011,11,2) => 'Dzień Zaduszny',
211
- Date.civil(2011,11,29) => 'Andrzejki',
212
- Date.civil(2011,12,4) => 'Barbórka (Dzień Górnika, Naftowca i Gazownika)',
213
- Date.civil(2011,12,6) => 'Mikołajki',
214
- Date.civil(2011,12,24) => 'Wigilia Bożego Narodzenia',
215
- Date.civil(2011,12,31) => 'Sylwester'}.each do |date, name|
216
- assert_equal name, (Holidays.on(date, :pl, :informal)[0] || {})[:name]
217
- end
218
-
219
- # informal
220
- {Date.civil(2011,1,21) => 'Dzień Babci',
221
- Date.civil(2011,1,22) => 'Dzień Dziadka',
222
- Date.civil(2011,2,2) => 'Ofiarowanie Pańskie (Matki Boskiej Gromnicznej)',
223
- Date.civil(2011,2,14) => 'Dzień Zakochanych (Walentynki)',
224
- Date.civil(2010,3,8) => 'Dzień Kobiet',
225
- Date.civil(2011,3,10) => 'Dzień Mężczyzn',
226
- Date.civil(2011,4,1) => 'Prima Aprilis',
227
- Date.civil(2010,4,22) => 'Międzynarodowy Dzień Ziemi',
228
- Date.civil(2011,5,2) => 'Dzień Flagi Rzeczpospolitej Polskiej',
229
- Date.civil(2010,6,23) => 'Dzień Ojca',
230
- Date.civil(2011,9,30) => 'Dzień Chłopaka',
231
- Date.civil(2011,10,14) => 'Dzień Nauczyciela (Dzień Edukacji Narodowej)',
232
- Date.civil(2011,11,2) => 'Dzień Zaduszny',
233
- Date.civil(2011,11,29) => 'Andrzejki',
234
- Date.civil(2011,12,4) => 'Barbórka (Dzień Górnika, Naftowca i Gazownika)',
235
- Date.civil(2011,12,6) => 'Mikołajki',
236
- Date.civil(2011,12,24) => 'Wigilia Bożego Narodzenia',
237
- Date.civil(2011,12,31) => 'Sylwester'}.each do |date, name|
238
- assert_equal nil, (Holidays.on(date, :pl)[0] || {})[:name]
239
- end
240
-
241
- # Objawienie Pańskie (święto Trzech Króli) -- formal since 2011
242
- [Date.civil(2008,1,6), Date.civil(2009,1,6), Date.civil(2010,1,6)].each do |date|
243
- assert_equal nil, (Holidays.on(date, :pl)[0] || {})[:name]
244
- end
245
- [Date.civil(2008,1,6), Date.civil(2009,1,6), Date.civil(2010,1,6)].each do |date|
246
- assert_equal 'Objawienie Pańskie (święto Trzech Króli)', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
247
- end
248
- [Date.civil(2011,1,6), Date.civil(2012,1,6), Date.civil(2013,1,6)].each do |date|
249
- assert_equal 'Objawienie Pańskie (święto Trzech Króli)', (Holidays.on(date, :pl)[0] || {})[:name]
250
- end
251
-
252
- # Tłusty Czwartek
253
- [Date.civil(2008,1,31), Date.civil(2009,2,19), Date.civil(2010,2,11),
254
- Date.civil(2011,3,3), Date.civil(2012,2,16)].each do |date|
255
- assert_equal 'Tłusty Czwartek', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
256
- end
257
-
258
- # Ostatki
259
- [Date.civil(2008,2,5), Date.civil(2009,2,24), Date.civil(2010,2,16),
260
- Date.civil(2011,3,8), Date.civil(2012,2,21)].each do |date|
261
- assert_equal 'Ostatki', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
262
- end
263
-
264
- # Środa Popielcowa
265
- [Date.civil(2008,2,6), Date.civil(2009,2,25), Date.civil(2010,2,17),
266
- Date.civil(2011,3,9), Date.civil(2012,2,22)].each do |date|
267
- assert_equal 'Środa Popielcowa', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
268
- end
269
-
270
- # Niedziela Palmowa
271
- [Date.civil(2008,3,16), Date.civil(2009,4,5), Date.civil(2010,3,28),
272
- Date.civil(2011,4,17), Date.civil(2012,4,1)].each do |date|
273
- assert_equal 'Niedziela Palmowa', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
274
- end
275
-
276
- # Wielki Czwartek
277
- [Date.civil(2008,3,20), Date.civil(2009,4,9), Date.civil(2010,4,1),
278
- Date.civil(2011,4,21), Date.civil(2012,4,5)].each do |date|
279
- assert_equal 'Wielki Czwartek', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
280
- end
281
-
282
- # Wielki Piątek
283
- [Date.civil(2008,3,21), Date.civil(2009,4,10), Date.civil(2010,4,2),
284
- Date.civil(2011,4,22), Date.civil(2012,4,6)].each do |date|
285
- assert_equal 'Wielki Piątek', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
286
- end
287
-
288
- # Wielka Sobota
289
- [Date.civil(2008,3,22), Date.civil(2009,4,11), Date.civil(2010,4,3),
290
- Date.civil(2011,4,23), Date.civil(2012,4,7)].each do |date|
291
- assert_equal 'Wielka Sobota', (Holidays.on(date, :pl, :informal)[0] || {})[:name]
292
- end
293
-
294
- # Niedziela Wielkanocna
295
- [Date.civil(2008,3,23), Date.civil(2009,4,12), Date.civil(2010,4,4),
296
- Date.civil(2011,4,24), Date.civil(2012,4,8)].each do |date|
297
- assert_equal 'Niedziela Wielkanocna', (Holidays.on(date, :pl)[0] || {})[:name]
298
- end
299
-
300
- # Poniedziałek Wielkanocny (Lany Poniedziałek)
301
- [Date.civil(2008,3,24), Date.civil(2009,4,13), Date.civil(2010,4,5),
302
- Date.civil(2011,4,25), Date.civil(2012,4,9)].each do |date|
303
- assert_equal 'Poniedziałek Wielkanocny (Lany Poniedziałek)', (Holidays.on(date, :pl)[0] || {})[:name]
304
- end
305
-
306
- # Zesłanie Ducha Świętego (Zielone Świątki)
307
- [Date.civil(2008,5,11), Date.civil(2009,5,31), Date.civil(2010,5,23),
308
- Date.civil(2011,6,12), Date.civil(2012,5,27)].each do |date|
309
- assert_equal 'Zesłanie Ducha Świętego (Zielone Świątki)', (Holidays.on(date, :pl)[0] || {})[:name]
310
- end
311
-
312
- # Uroczystość Najświętszego Ciała i Krwi Pańskiej (Boże Ciało)
313
- [Date.civil(2008,5,22), Date.civil(2009,6,11), Date.civil(2010,6,3),
314
- Date.civil(2011,6,23), Date.civil(2012,6,7)].each do |date|
315
- assert_equal 'Uroczystość Najświętszego Ciała i Krwi Pańskiej (Boże Ciało)', (Holidays.on(date, :pl)[0] || {})[:name]
316
- end
317
-
318
- # Wniebowzięcie Najświętszej Maryi Panny & Święto Wojska Polskiego
319
- assert_equal 'Wniebowzięcie Najświętszej Maryi Panny', (Holidays.on(Date.civil(2011,8,15), :pl)[0] || {})[:name]
320
- assert_equal 'Święto Wojska Polskiego', (Holidays.on(Date.civil(2011,8,15), :pl)[1] || {})[:name]