https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40636
Tomás Cohen Arazi (tcohen) <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185346|0 |1 is obsolete| | Attachment #185347|0 |1 is obsolete| | Attachment #185348|0 |1 is obsolete| | Attachment #185349|0 |1 is obsolete| | --- Comment #5 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 185350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185350&action=edit Bug 40636: Add `Koha::Calendar->has_business_days_between()` method This patch adds a new method to Koha::Calendar that returns a boolean indicating whether there are any business days between two given dates (exclusive). Implementation details: * Returns 1 if any business days exist between start and end dates * Returns 0 for consecutive days, same dates, or only holidays between * Uses exclusive range (does not include start or end dates) * Handles date comparison and timezone normalization * Efficient early return when first business day is found This is designed specifically for use cases like detecting missed business days due to server downtime or scheduling issues. To test: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Calendar.t => SUCCESS: All tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
