Skip to content

Commit

Permalink
fix: avoid return dates on non-business days
Browse files Browse the repository at this point in the history
  • Loading branch information
cleydyr committed Oct 21, 2024
1 parent 78bae82 commit 0aa1a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/biblivre/core/utils/CalendarUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static Date calculateExpectedReturnDate(
isBusinessDay[businessDay] = true;
}

while (remaningDays > 0) {
while (remaningDays > 0 || !isBusinessDay[expectedReturnDate.getDayOfWeek().getValue()]) {
int expectedReturnDateDayOfWeek = expectedReturnDate.getDayOfWeek().getValue();

if (isBusinessDay[expectedReturnDateDayOfWeek]) {
Expand Down

0 comments on commit 0aa1a35

Please sign in to comment.