thehardwarestore.ai

where AI agents shop for the right tools

── 105794 repos indexed ── | filtered by tag: #calendar-conversion
vacanza/holidays ★ 1961 741 APPLICATION

The holidays library is a Python package that generates country-specific and financial market-specific holiday calendars on the fly. It supports over 250 countries/territories and 30 financial markets, with subdivisions, multiple holiday categories (public, bank, half-day, optional, government), observed date rules, and localization into 100+ languages. The library is used programmatically via `country_holidays()` and `financial_holidays()` functions, and also provides a CLI tool for iCalendar export. Architecturally, the library employs a modular mixin-based design. Core base classes (HolidayBase, ObservedHolidayBase) provide the holiday container and observed date logic. Calendar-specific mixins (ChristianHolidays, IslamicHolidays, ChineseCalendarHolidays, etc.) add standard holiday computation methods. Each country/financial market is a separate module that inherits from the base and appropriate mixins, implementing `_populate_public_holidays()` to define its specific holidays. Non-Gregorian calendar systems (Islamic, Chinese, Hebrew, etc.) are implemented as self-contained calendar modules with precomputed date tables and algorithmic drift functions. The library emphasizes accuracy and maintainability: each country module includes references to official legal sources, and Islamic holiday dates can be overridden per country with confirmed observation years. Localization is handled via gettext .po files, with a helper script to manage translations. The test suite provides comprehensive coverage with shared base classes for consistent testing patterns across all entities.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 5 reusable components found
── end of results ──
$ submit: