forked from holidays/definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ar.yaml
268 lines (265 loc) · 5.99 KB
/
ar.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# Argentinian holiday definitions for the Ruby Holiday gem.
#
# Updated: 2021-05-16.
#
# Sources:
# - http://en.wikipedia.org/wiki/Public_holidays_in_Argentina
# - http://servicios.lanacion.com.ar/feriados/2016
# - https://www.argentina.gob.ar/interior/feriados-nacionales-2020
# - https://www.argentina.gob.ar/interior/feriados-nacionales-2021
---
methods:
to_nearest_monday:
arguments: date
ruby: |
case date.wday
when 5
date += 3
when 4
date += 4
when 3
date -= 2
when 2
date -= 1
end
date
months:
0:
- name: Viernes Santo
regions: [ar]
function: easter(year)
function_modifier: -2
- name: Carnaval Lunes
regions: [ar]
function: easter(year)
function_modifier: -48
- name: Carnaval Martes
regions: [ar]
function: easter(year)
function_modifier: -47
1:
- name: Año Nuevo
regions: [ar]
mday: 1
3:
- name: Día Nacional de la Memoria por la Verdad y la Justicia
regions: [ar]
mday: 24
4:
- name: Día del Veterano y de los Caídos en la Guerra de Malvinas
regions: [ar]
mday: 2
5:
- name: Día del Trabajador
regions: [ar]
mday: 1
- name: Día de la Revolución de Mayo
regions: [ar]
mday: 25
- name: Feriado con fines turísticos
regions: [ar]
mday: 24
year_ranges:
limited: [2021]
6:
- name: Paso a la Inmortalidad del General Martín Miguel de Güemes
regions: [ar]
mday: 17
function: to_nearest_monday(date)
- name: Día de la Bandera
regions: [ar]
mday: 20
7:
- name: Feriado con fines turísticos
regions: [ar]
mday: 8
year_ranges:
limited: [2016]
- name: Día de la Independencia
regions: [ar]
mday: 9
8:
- name: Paso a la Inmortalidad del General José de San Martín
regions: [ar]
mday: 17
function: to_nearest_monday(date)
10:
- name: Día del Respeto a la Diversidad Cultural
regions: [ar]
mday: 12
function: to_nearest_monday(date)
- name: Feriado con fines turísticos
regions: [ar]
mday: 8
year_ranges:
limited: [2021]
11:
- name: Día de la Soberanía Nacional
regions: [ar]
mday: 20
- name: Feriado con fines turísticos
regions: [ar]
mday: 22
year_ranges:
limited: [2021]
12:
- name: Inmaculada Concepción de María
regions: [ar]
mday: 8
- name: Feriado con fines turísticos
regions: [ar]
mday: 9
year_ranges:
limited: [2016]
- name: Navidad
regions: [ar]
mday: 25
tests:
- given:
date: '2016-01-01'
regions: ['ar']
options: 'informal'
expect:
name: 'Año Nuevo'
- given:
date: '2016-02-08'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Lunes'
- given:
date: '2016-02-09'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Martes'
- given:
date: '2017-02-27'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Lunes'
- given:
date: '2017-02-28'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Martes'
- given:
date: '2018-02-12'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Lunes'
- given:
date: '2018-02-13'
regions: ['ar']
options: 'informal'
expect:
name: 'Carnaval Martes'
- given:
date: '2016-03-24'
regions: ['ar']
options: 'informal'
expect:
name: 'Día Nacional de la Memoria por la Verdad y la Justicia'
- given:
date: '2016-03-25'
regions: ['ar']
options: 'informal'
expect:
name: 'Viernes Santo'
- given:
date: '2016-04-02'
regions: ['ar']
options: 'informal'
expect:
name: 'Día del Veterano y de los Caídos en la Guerra de Malvinas'
- given:
date: '2016-05-01'
regions: ['ar']
options: 'informal'
expect:
name: 'Día del Trabajador'
- given:
date: '2016-05-25'
regions: ['ar']
options: 'informal'
expect:
name: 'Día de la Revolución de Mayo'
- given:
date: ['2020-06-15', '2021-06-21']
regions: ['ar']
options: 'informal'
expect:
name: 'Paso a la Inmortalidad del General Martín Miguel de Güemes'
holiday: true
- given:
date: ['2020-06-17', '2021-06-17']
regions: ['ar']
options: 'informal'
expect:
holiday: false
- given:
date: '2016-06-20'
regions: ['ar']
options: 'informal'
expect:
name: 'Paso a la Inmortalidad del General Martín Miguel de Güemes'
- given:
date: '2016-07-09'
regions: ['ar']
options: 'informal'
expect:
name: 'Día de la Independencia'
- given:
date: ['2016-08-15', '2020-08-17', '2021-08-16']
regions: ['ar']
options: 'informal'
expect:
name: 'Paso a la Inmortalidad del General José de San Martín'
holiday: true
- given:
date: ['2016-08-17', '2021-08-17']
regions: ['ar']
options: 'informal'
expect:
holiday: false
- given:
date: ['2016-10-10', '2021-10-11']
regions: ['ar']
options: 'informal'
expect:
name: 'Día del Respeto a la Diversidad Cultural'
holiday: true
- given:
date: '2021-10-12'
regions: ['ar']
options: 'informal'
expect:
holiday: false
- given:
date: '2016-11-20'
regions: ['ar']
options: 'informal'
expect:
name: 'Día de la Soberanía Nacional'
- given:
date: '2016-12-08'
regions: ['ar']
options: 'informal'
expect:
name: 'Inmaculada Concepción de María'
- given:
date: ['2016-07-08', '2016-12-09', '2021-05-24', '2021-10-8', '2021-11-22']
regions: ['ar']
options: 'informal'
expect:
name: 'Feriado con fines turísticos'
holyday: true
- given:
date: '2016-12-25'
regions: ['ar']
options: 'informal'
expect:
name: 'Navidad'