code: private static void listTimephasedWork(ResourceAssignment assignment)
     {
        Task task = assignment.getTask();
        int days = (int) ((task.getFinish().getTime() - task.getStart().getTime()) / (1000 * 60 * 60 * 24)) + 1;
        if (days > 1)
        {
           SimpleDateFormat df = new SimpleDateFormat("dd/MM/yy");
  
           TimescaleUtility timescale = new TimescaleUtility();
           ArrayList<DateRange> dates = timescale.createTimescale(task.getStart(), TimescaleUnits.DAYS, days);
           TimephasedUtility timephased = new TimephasedUtility();
  
           ArrayList<Duration> durations = timephased.segmentWork(assignment.getCalendar(), assignment.getTimephasedWork(), TimescaleUnits.DAYS, dates);
           for (DateRange range : dates)
           {
              System.out.print(df.format(range.getStart()) + "\t");
           }
           System.out.println();
           for (Duration duration : durations)
           {
              System.out.print(duration.toString() + "        ".substring(0, 7) + "\t");
           }
           System.out.println();
        }
     }
docs: Dump timephased work for an assignment.
  
  @param assignment resource assignment