[Fix] Fixed PeriodHelper shift for days

This commit is contained in:
Robert von Burg 2021-06-11 11:54:19 +02:00
parent 51c6d74955
commit 8eaf7d9625
1 changed files with 5 additions and 3 deletions

View File

@ -239,9 +239,11 @@ public class PeriodHelper {
return date;
ZonedDateTime result = date.plusDays(shiftDays);
if (result.isBefore(end))
return result;
return date.plusDays(shiftDays - 1);
while (!result.isBefore(end)) {
shiftDays--;
result = date.plusDays(shiftDays);
}
return result;
}
if (!period.isZero())