Calendar Modes & Data Structure Overhaul
This release marks a significant step forward for the Kenat library, introducing powerful new ways to view and filter the calendar. The highlight is the new Calendar Modes feature, alongside major improvements to the data structures and overall code quality that make the library more robust and easier to maintain.
✨ New Features
-
Calendar Modes: You can now initialize the calendar in one of several modes to exclusively display certain types of holidays:
- Public Holidays Mode: A mode to display only official non-working public holidays. This is now the default mode for the
Kenat.getMonthCalendar()
static method. - Christian Mode: A comprehensive mode for Christian holidays, showing movable feasts from Bahire Hasab (like Fasika), major fixed holidays, and recurring monthly saints' days.
- Muslim Mode: A dedicated mode for Muslim holidays, which also automatically highlights every Friday as "Jummah" on the calendar grid.
- Public Holidays Mode: A mode to display only official non-working public holidays. This is now the default mode for the
-
Saints' Day Filter: Within Christian Mode, a new option allows users to toggle between viewing only major annual feasts ("Nigs") or showing all daily saints' commemorations for a less cluttered view.
🛠️ Improvements & Refactoring
- Refactored
nigs.js
Data Structure: The data structure for saints with multiple annual commemorations (e.g., Abuna Takla Haymanot) has been refactored. Events are now nested under a single parent saint object, eliminating data redundancy and making the structure more logical and scalable. - Refactored
MonthGrid
Logic: The coregenerate()
method in theMonthGrid
class has been broken down into smaller, single-responsibility helper methods. This significantly improves code readability and makes future maintenance and feature development easier. - Updated Holiday Data: Siklet (Good Friday) is now correctly tagged as a
PUBLIC
holiday, ensuring it appears in the "Public Holidays" mode.
✅ Fixes
- Fixed an issue where the calendar UI could fail to display certain holidays when multiple event types (e.g., a public holiday and a saint's day) occurred on the same date. The new styling logic correctly handles overlapping events.
- Resolved bugs in the demo application where navigation buttons and event modals would become unresponsive after certain operations.