code: private void writeAssignmentTimephasedData(BigInteger assignmentID, List<TimephasedDataType> list, List<TimephasedWork> data, int type)
     {
        for (TimephasedWork mpx : data)
        {
           TimephasedDataType xml = m_factory.createTimephasedDataType();
           list.add(xml);
  
           xml.setStart(mpx.getStart());
           xml.setFinish(mpx.getFinish());
           xml.setType(BigInteger.valueOf(type));
           xml.setUID(assignmentID);
           xml.setUnit(DatatypeConverter.printDurationTimeUnits(mpx.getTotalAmount(), false));
           xml.setValue(DatatypeConverter.printDuration(this, mpx.getTotalAmount()));
        }
     }
docs: Writes a list of timephased data to the MSPDI file.
  
  @param assignmentID current assignment ID
  @param list output list of timephased data items
  @param data input list of timephased data
  @param type list type (planned or completed)