vacanza / holidays

Generate and work with holidays in Python
https://pypi.org/project/holidays
MIT License
1.45k stars 460 forks source link

Consider making holiday object a first-class citizen #1712

Open arkid15r opened 7 months ago

arkid15r commented 7 months ago

The current PH version uses simple date/str pair as an item of dict-based holidays container.

Do we need/want to extend it to something more complex that would allow us having additional attributes on holiday object level (not only name, but also type/category, observance, other flags, etc)? Would the flexibility worth the efficiency trade-off (at this moment I can think of at least the new object size)?

This is based on an idea from https://github.com/vacanza/python-holidays/issues/784#issuecomment-1431376193. The interface example -- https://github.com/commenthol/date-holidays/blob/4596fb6c83c1339316529ae73c78e39646739488/types/index.d.ts#L55