code: @Override protected void mergeSameDay(ProjectCalendar calendar, LinkedList<TimephasedWork> list)
     {
        LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
  
        TimephasedWork previousAssignment = null;
        for (TimephasedWork assignment : list)
        {
           if (previousAssignment == null)
           {
              assignment.setAmountPerDay(assignment.getTotalAmount());
              result.add(assignment);
           }
           else
           {
              Date previousAssignmentStart = previousAssignment.getStart();
              Date previousAssignmentStartDay = DateHelper.getDayStartDate(previousAssignmentStart);
              Date assignmentStart = assignment.getStart();
              Date assignmentStartDay = DateHelper.getDayStartDate(assignmentStart);
  
              if (previousAssignmentStartDay.getTime() == assignmentStartDay.getTime())
              {
                 result.removeLast();
  
                 double work = previousAssignment.getTotalAmount().getDuration();
                 work += assignment.getTotalAmount().getDuration();
                 Duration totalWork = Duration.getInstance(work, TimeUnit.MINUTES);
  
                 TimephasedWork merged = new TimephasedWork();
                 merged.setStart(previousAssignment.getStart());
                 merged.setFinish(assignment.getFinish());
                 merged.setTotalAmount(totalWork);
                 assignment = merged;
              }
  
              assignment.setAmountPerDay(assignment.getTotalAmount());
              result.add(assignment);
           }
  
           previousAssignment = assignment;
        }
  
        list.clear();
        list.addAll(result);
     }
docs: This method merges together assignment data for the same day.
  
  @param calendar current calendar
  @param list assignment data