code: private void writeAssignmentTimephasedData(ResourceAssignment mpx, Project.Assignments.Assignment xml)
     {
        if (m_writeTimphasedData && mpx.getHasTimephasedData())
        {
           List<TimephasedDataType> list = xml.getTimephasedData();
           ProjectCalendar calendar = mpx.getCalendar();
           BigInteger assignmentID = xml.getUID();
  
           List<TimephasedWork> complete = mpx.getTimephasedActualWork();
           List<TimephasedWork> planned = mpx.getTimephasedWork();
  
           if (m_splitTimephasedAsDays)
           {
              TimephasedWork lastComplete = null;
              if (complete != null && !complete.isEmpty())
              {
                 lastComplete = complete.get(complete.size() - 1);
              }
  
              TimephasedWork firstPlanned = null;
              if (planned != null && !planned.isEmpty())
              {
                 firstPlanned = planned.get(0);
              }
  
              if (planned != null)
              {
                 planned = splitDays(calendar, mpx.getTimephasedWork(), null, lastComplete);
              }
  
              if (complete != null)
              {
                 complete = splitDays(calendar, complete, firstPlanned, null);
              }
           }
  
           if (planned != null)
           {
              writeAssignmentTimephasedData(assignmentID, list, planned, 1);
           }
  
           if (complete != null)
           {
              writeAssignmentTimephasedData(assignmentID, list, complete, 2);
           }
        }
     }
docs: Writes the timephased data for a resource assignment.
  
  @param mpx MPXJ assignment
  @param xml MSDPI assignment