code: private void processCalendars(APIBusinessObjects apibo)
     {
        for (CalendarType row : apibo.getCalendar())
        {
           ProjectCalendar calendar = m_projectFile.addCalendar();
           Integer id = row.getObjectId();
           m_calMap.put(id, calendar);
           calendar.setName(row.getName());
           calendar.setUniqueID(id);
  
           StandardWorkWeek stdWorkWeek = row.getStandardWorkWeek();
           if (stdWorkWeek != null)
           {
              for (StandardWorkHours hours : stdWorkWeek.getStandardWorkHours())
              {
                 Day day = DAY_MAP.get(hours.getDayOfWeek());
                 List<WorkTimeType> workTime = hours.getWorkTime();
                 if (workTime.isEmpty() || workTime.get(0) == null)
                 {
                    calendar.setWorkingDay(day, false);
                 }
                 else
                 {
                    calendar.setWorkingDay(day, true);
  
                    ProjectCalendarHours calendarHours = calendar.addCalendarHours(day);
                    for (WorkTimeType work : workTime)
                    {
                       if (work != null)
                       {
                          calendarHours.addRange(new DateRange(work.getStart(), getEndTime(work.getFinish())));
                       }
                    }
                 }
              }
           }
  
           HolidayOrExceptions hoe = row.getHolidayOrExceptions();
           if (hoe != null)
           {
              for (HolidayOrException ex : hoe.getHolidayOrException())
              {
                 Date startDate = DateHelper.getDayStartDate(ex.getDate());
                 Date endDate = DateHelper.getDayEndDate(ex.getDate());
                 ProjectCalendarException pce = calendar.addCalendarException(startDate, endDate);
  
                 List<WorkTimeType> workTime = ex.getWorkTime();
                 for (WorkTimeType work : workTime)
                 {
                    if (work != null)
                    {
                       pce.addRange(new DateRange(work.getStart(), getEndTime(work.getFinish())));
                    }
                 }
              }
           }
        }
     }
docs: Process project calendars.
  
  @param apibo xml container