code: private void splitDays(ProjectCalendar calendar, LinkedList<TimephasedWork> list)
     {
        LinkedList<TimephasedWork> result = new LinkedList<TimephasedWork>();
        for (TimephasedWork assignment : list)
        {
           while (assignment != null)
           {
              Date startDay = DateHelper.getDayStartDate(assignment.getStart());
              Date finishDay = DateHelper.getDayStartDate(assignment.getFinish());
  
              // special case - when the finishday time is midnight, it's really the previous day...
              if (assignment.getFinish().getTime() == finishDay.getTime())
              {
                 finishDay = DateHelper.addDays(finishDay, -1);
              }
  
              if (startDay.getTime() == finishDay.getTime())
              {
                 result.add(assignment);
                 break;
              }
  
              TimephasedWork[] split = splitFirstDay(calendar, assignment);
              if (split[0] != null)
              {
                 result.add(split[0]);
              }
              assignment = split[1];
           }
        }
  
        list.clear();
        list.addAll(result);
     }
docs: This method breaks down spans of time into individual days.
  
  @param calendar current project calendar
  @param list list of assignment data