EffortDuration effortAssigned = zero();
UntilEndAndEffort condition = new UntilEndAndEffort(
endsAfter.toIntraDayDate(), totalEffort);
for (PartialDay each : startTime.toIntraDayDate().daysUntil(condition)) {
EffortDuration effortForDay = EffortDuration.min(
calendar.asDurationOn(each,
ONE_RESOURCE_PER_DAY), totalEffort);
DayAssignment dayAssignment = createDayAssignment(
resourceAllocation, resource, each.getDate(), effortForDay);
effortAssigned = effortAssigned.plus(addDayAssignment(assignments,
dayAssignment));