code: private void writeExceptions9(List<Project.Calendars.Calendar.WeekDays.WeekDay> dayList, List<ProjectCalendarException> exceptions)
     {
        for (ProjectCalendarException exception : exceptions)
        {
           boolean working = exception.getWorking();
  
           Project.Calendars.Calendar.WeekDays.WeekDay day = m_factory.createProjectCalendarsCalendarWeekDaysWeekDay();
           dayList.add(day);
           day.setDayType(BIGINTEGER_ZERO);
           day.setDayWorking(Boolean.valueOf(working));
  
           Project.Calendars.Calendar.WeekDays.WeekDay.TimePeriod period = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayTimePeriod();
           day.setTimePeriod(period);
           period.setFromDate(exception.getFromDate());
           period.setToDate(exception.getToDate());
  
           if (working)
           {
              Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes times = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimes();
              day.setWorkingTimes(times);
              List<Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime> timesList = times.getWorkingTime();
  
              for (DateRange range : exception)
              {
                 Project.Calendars.Calendar.WeekDays.WeekDay.WorkingTimes.WorkingTime time = m_factory.createProjectCalendarsCalendarWeekDaysWeekDayWorkingTimesWorkingTime();
                 timesList.add(time);
  
                 time.setFromTime(range.getStart());
                 time.setToTime(range.getEnd());
              }
           }
        }
     }
docs: Write exceptions in the format used by MSPDI files prior to Project 2007.
  
  @param dayList list of calendar days
  @param exceptions list of exceptions