[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; return date;
ZonedDateTime result = date.plusDays(shiftDays); ZonedDateTime result = date.plusDays(shiftDays);
if (result.isBefore(end)) while (!result.isBefore(end)) {
return result; shiftDays--;
return date.plusDays(shiftDays - 1); result = date.plusDays(shiftDays);
}
return result;
} }
if (!period.isZero()) if (!period.isZero())