2024-08-26 should be a holiday in GB
Closed this issue · 3 comments
mrgum commented
Bug Report
Expected Behavior
2024-08-26 should be a holiday in GB
Actual Behavior
holidays does not treat it as a holiday
Steps to Reproduce the Problem
from datetime import datetime
import holidays
uk_holidays = holidays.GB()
if '2024-08-24' in uk_holidays:
print("enjoy the day off work")
dateobj = datetime.strptime('2024-08-24', "%Y-%m-%d")
if dateobj in uk_holidays:
print("enjoy the day off work")
should print but does not
Environment
- OS: mac 14.6
- Python version: Python 3.10.3
- holidays version: 0.54
Additional Context
KJhellico commented
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, e.g.
import holidays
uk_eng_holidays = holidays.GB(subdiv="ENG") # or "WLS" or "NIR"
if "2024-08-26" in uk_eng_holidays:
print("enjoy the day off work")
mrgum commented
Thank you!