https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43492 --- Comment #15 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 205376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205376&action=edit Bug 43492: Switch CalcDateDue onto Koha::Library::OpeningHours C4::Circulation::CalcDateDue was the only functional consumer of library_hours: for hourly loan periods it looked up today's/tomorrow's Koha::Library::Hours row directly and snapped the due time to open_time/close_time depending on ConsiderLibraryHoursInCirculation, with the snap-target hardcoded from those two single rows. Replaces that direct table access with Koha::Library->opening_hours (is_open_at/next_open/previous_close), preserving the exact same close/open/ignore branching and calendar-duration handling as before, but now correctly handling multiple slots per day and slots that cross midnight (previously unrepresentable at all) - covered by new overnight test cases in CalcDateDue.t alongside the full existing suite, which still passes unchanged, confirming behaviour is preserved for the existing single-slot-per-day cases. Calendar-aware availability (consulting Koha::Library->calendar, for Bug 36079) is added in Bug 43493 - CalcDateDue benefits from it automatically once that lands, since it calls the same facade methods. -- You are receiving this mail because: You are watching all bug changes.