@@ -54,13 +54,13 @@ Let's print out the holidays in 2014 specific to California, USA:
54
54
2014 - 01 - 20 Martin Luther King Jr. Day
55
55
2014 - 02 - 15 Susan B. Anthony Day
56
56
2014 - 02 - 17 Washington' s Birthday
57
- 2014 - 03 - 31 César Chávez Day
57
+ 2014 - 03 - 31 Cesar Chavez Day
58
58
2014 - 05 - 26 Memorial Day
59
59
2014 - 07 - 04 Independence Day
60
60
2014 - 09 - 01 Labor Day
61
- 2014 - 10 - 13 Columbus Day
62
61
2014 - 11 - 11 Veterans Day
63
62
2014 - 11 - 27 Thanksgiving
63
+ 2014 - 11 - 28 Day After Thanksgiving
64
64
2014 - 12 - 25 Christmas Day
65
65
66
66
So far we've only checked holidays in 2014 so that's the only year the Holidays
@@ -139,15 +139,14 @@ To change the language translation, you can set the language explicitly.
139
139
>> > for dt, name in sorted (holidays.ES(years = 2023 , language = " es" ).items()):
140
140
>> > print (dt, name)
141
141
2023 - 01 - 06 Epifanía del Señor
142
- 2023 - 04 - 06 Jueves Santo
143
142
2023 - 04 - 07 Viernes Santo
144
- 2023 - 05 - 01 Día del Trabajador
143
+ 2023 - 05 - 01 Fiesta del Trabajo
145
144
2023 - 08 - 15 Asunción de la Virgen
146
- 2023 - 10 - 12 Día de la Hispanidad
145
+ 2023 - 10 - 12 Fiesta Nacional de España
147
146
2023 - 11 - 01 Todos los Santos
148
147
2023 - 12 - 06 Día de la Constitución Española
149
- 2023 - 12 - 08 La Inmaculada Concepción
150
- 2023 - 12 - 25 Navidad
148
+ 2023 - 12 - 08 Inmaculada Concepción
149
+ 2023 - 12 - 25 Natividad del Señ or
151
150
152
151
Holiday categories support
153
152
--------------------------
@@ -165,21 +164,20 @@ To get a list of other categories holidays (for countries that support them):
165
164
>> > print (dt, name)
166
165
2023 - 01 - 01 New Year' s Day
167
166
2023 - 04 - 07 Good Friday
168
- 2023 - 04 - 09 Easter
167
+ 2023 - 04 - 09 Easter Sunday
169
168
2023 - 04 - 10 Easter Monday
170
169
2023 - 05 - 01 Labor Day
171
170
2023 - 05 - 18 Ascension Day
172
171
2023 - 05 - 19 Friday after Ascension Day
173
172
2023 - 05 - 28 Whit Sunday
174
173
2023 - 05 - 29 Whit Monday
175
174
2023 - 07 - 21 National Day
176
- 2023 - 08 - 15 Assumption of Mary
175
+ 2023 - 08 - 15 Assumption Day
177
176
2023 - 11 - 01 All Saints' Day
178
177
2023 - 11 - 11 Armistice Day
179
178
2023 - 12 - 25 Christmas Day
180
179
2023 - 12 - 26 Bank Holiday
181
180
182
-
183
181
Date from holiday name
184
182
----------------------
185
183
@@ -190,10 +188,10 @@ with case insensitive check):
190
188
.. code-block :: python
191
189
192
190
>> > us_holidays = holidays.UnitedStates(years = 2020 )
193
- >> > us_holidays.get_named(' day' )
191
+ >> > sorted ( us_holidays.get_named(' day' ) )
194
192
[datetime.date(2020 , 1 , 1 ), datetime.date(2020 , 1 , 20 ),
195
193
datetime.date(2020 , 2 , 17 ), datetime.date(2020 , 5 , 25 ),
196
- datetime.date(2020 , 7 , 4 ), datetime.date(2020 , 7 , 3 ),
194
+ datetime.date(2020 , 7 , 3 ), datetime.date(2020 , 7 , 4 ),
197
195
datetime.date(2020 , 9 , 7 ), datetime.date(2020 , 10 , 12 ),
198
196
datetime.date(2020 , 11 , 11 ), datetime.date(2020 , 12 , 25 )]
199
197
@@ -229,9 +227,7 @@ holidays using the built-in :py:func:`sum` function:
229
227
230
228
>> > a = sum ([holidays.CA(subdiv = x) for x in holidays.CA .subdivisions])
231
229
>> > a.subdiv
232
- [' AB' , ' BC' , ' MB' , ' NB' , ' NL' , ' NS' , ' NT' , ' NU' , ' ON' , ' PE' , ' QC' , ' SK' ,
233
- ' YU' ]
234
-
230
+ [' AB' , ' BC' , ' MB' , ' NB' , ' NL' , ' NS' , ' NT' , ' NU' , ' ON' , ' PE' , ' QC' , ' SK' , ' YT' ]
235
231
236
232
Creating custom holidays (or augmenting existing ones with private ones)
237
233
------------------------------------------------------------------------
@@ -308,7 +304,6 @@ pairs, a list of dates, or even singular date/string/timestamp objects:
308
304
>> > custom_holidays.append([' 2015-01-01' , ' 07/04/2015' ])
309
305
>> > custom_holidays.append(date(2015 , 12 , 25 ))
310
306
311
-
312
307
Add years to an existing Holiday object
313
308
---------------------------------------
314
309
@@ -323,8 +318,6 @@ holiday object:
323
318
# to add new years of holidays to the object:
324
319
>> > us_holidays.update(country_holidays(' US' , years = 2021 ))
325
320
326
-
327
-
328
321
Other ways to specify the country
329
322
---------------------------------
330
323
0 commit comments