When the loan period is shortened to the patron expiry date (syspref ReturnBeforeExpiry) it's possible that the due date falls on a day the library is closed. If the loan period is shortened, the due date should always be the last possible day the library is open before the patron expires.
*** This bug has been marked as a duplicate of bug 11580 ***