code: private void addEntryToResult(Map<LocalDate, List<Entry<?>>> result, Entry<?> entry, LocalDate startDate, LocalDate endDate) {
          LocalDate entryStartDate = entry.getStartDate();
          LocalDate entryEndDate = entry.getEndDate();
  
          // entry does not intersect with time interval
          if (entryEndDate.isBefore(startDate) || entryStartDate.isAfter(endDate)) {
              return;
          }
  
          if (entryStartDate.isAfter(startDate)) {
              startDate = entryStartDate;
          }
  
          if (entryEndDate.isBefore(endDate)) {
              endDate = entryEndDate;
          }
  
          LocalDate date = startDate;
          do {
              result.computeIfAbsent(date, it -> new ArrayList<>()).add(entry);
              date = date.plusDays(1);
          } while (!date.isAfter(endDate));
      }
docs: /*
  Assign the given entry to each date that it intersects with in the given search interval.