vacanza/holidays

Easter Monday and Last August Bank Holiday are missing for the United Kingdom (UK)

Closed this issue · 2 comments

When displaying all of the holidays under UK only these are returned.
Easter Monday and Last August Bank Holiday are missing.
Strangely New Year's Day appears midway through the output unlike other countries.

Screenshot attached...

image

Easter Monday and Summer Bank Holiday is relevant only to England, Wales and Northern Ireland, not whole UK. So if we want to see it, need to specify subdivision.

Strangely New Year's Day appears midway through the output unlike other countries.

Python dict is not ordered, so we can't expect holidays in chronological order. You can use sorting functions if needed.

>>> import holidays
>>> uk_eng_holidays = holidays.UK(subdiv="ENG", years=2024)  # or "WLS" or "NIR"
>>> for holiday in sorted(uk_eng_holidays.items()):
>>>     print(holiday)

(datetime.date(2024, 1, 1), "New Year's Day")
(datetime.date(2024, 3, 29), 'Good Friday')
(datetime.date(2024, 4, 1), 'Easter Monday')
(datetime.date(2024, 5, 6), 'May Day')
(datetime.date(2024, 5, 27), 'Spring Bank Holiday')
(datetime.date(2024, 8, 26), 'Late Summer Bank Holiday')
(datetime.date(2024, 12, 25), 'Christmas Day')
(datetime.date(2024, 12, 26), 'Boxing Day')

@KJhellico
Thanks a lot for you quick reply.

Sorry yes we would use public holidays of England rather than the UK in general, thanks.
Also thanks for the sorting order info.