https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43493 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205407&action=edit Bug 43493: Link Koha::Library::OpeningHours to the Calendar Adds a lazy calendar accessor to Koha::Library::OpeningHours and an opt-in consider_calendar param on is_open_at, so callers can ask "is this library open right now" and have the answer reflect Calendar holidays as well as configured hours - resolving Bug 36079, where the two subsystems had no knowledge of each other. Deliberately opt-in rather than the default: C4::Circulation::CalcDateDue already uses is_open_at (via Bug 43492) inside its "Days" due-date mode, which is explicitly documented as ignoring the calendar. Making is_open_at unconditionally calendar-aware would silently change that already-submitted behaviour; CalcDateDue is untouched by this patch. Test plan: 1. prove t/db_dependent/Koha/Library/OpeningHours.t 2. Note the new "is_open_at consider_calendar (Bug 36079)" subtest: configure Wednesday 09:00-17:00 hours for a library, add a single Calendar closure for a specific Wednesday, and confirm is_open_at($dt) still says open (hours only) while is_open_at($dt, consider_calendar => 1) says closed for that date, and unaffected Wednesdays are unaffected either way. 3. prove t/db_dependent/Circulation/CalcDateDue.t t/db_dependent/Koha/Library.t t/db_dependent/Koha/Library/Calendar.t to confirm no regressions. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.