code: private void readCalendar(Gantt gantt)
     {
        Gantt.Calendar ganttCalendar = gantt.getCalendar();
        m_projectFile.getProjectProperties().setWeekStartDay(ganttCalendar.getWeekStart());
  
        ProjectCalendar calendar = m_projectFile.addCalendar();
        calendar.setName("Standard");
        m_projectFile.setDefaultCalendar(calendar);
  
        String workingDays = ganttCalendar.getWorkDays();
        calendar.setWorkingDay(Day.SUNDAY, workingDays.charAt(0) == '1');
        calendar.setWorkingDay(Day.MONDAY, workingDays.charAt(1) == '1');
        calendar.setWorkingDay(Day.TUESDAY, workingDays.charAt(2) == '1');
        calendar.setWorkingDay(Day.WEDNESDAY, workingDays.charAt(3) == '1');
        calendar.setWorkingDay(Day.THURSDAY, workingDays.charAt(4) == '1');
        calendar.setWorkingDay(Day.FRIDAY, workingDays.charAt(5) == '1');
        calendar.setWorkingDay(Day.SATURDAY, workingDays.charAt(6) == '1');
  
        for (int i = 1; i <= 7; i++)
        {
           Day day = Day.getInstance(i);
           ProjectCalendarHours hours = calendar.addCalendarHours(day);
           if (calendar.isWorkingDay(day))
           {
              hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
              hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
           }
        }
  
        for (Gantt.Holidays.Holiday holiday : gantt.getHolidays().getHoliday())
        {
           ProjectCalendarException exception = calendar.addCalendarException(holiday.getDate(), holiday.getDate());
           exception.setName(holiday.getContent());
        }
     }
docs: Read the calendar data from a Gantt Designer file.
  
  @param gantt Gantt Designer file.