code: private void readCalendar(Project.Calendars.Calendar calendar, HashMap<BigInteger, ProjectCalendar> map, List<Pair<ProjectCalendar, BigInteger>> baseCalendars)
     {
        ProjectCalendar bc = m_projectFile.addCalendar();
        bc.setUniqueID(NumberHelper.getInteger(calendar.getUID()));
        bc.setName(calendar.getName());
        BigInteger baseCalendarID = calendar.getBaseCalendarUID();
        if (baseCalendarID != null)
        {
           baseCalendars.add(new Pair<ProjectCalendar, BigInteger>(bc, baseCalendarID));
        }
  
        readExceptions(calendar, bc);
        boolean readExceptionsFromDays = bc.getCalendarExceptions().isEmpty();
  
        Project.Calendars.Calendar.WeekDays days = calendar.getWeekDays();
        if (days != null)
        {
           for (Project.Calendars.Calendar.WeekDays.WeekDay weekDay : days.getWeekDay())
           {
              readDay(bc, weekDay, readExceptionsFromDays);
           }
        }
        else
        {
           bc.setWorkingDay(Day.SUNDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.MONDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.TUESDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.WEDNESDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.THURSDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.FRIDAY, DayType.DEFAULT);
           bc.setWorkingDay(Day.SATURDAY, DayType.DEFAULT);
        }
  
        readWorkWeeks(calendar, bc);
  
        map.put(calendar.getUID(), bc);
  
        m_eventManager.fireCalendarReadEvent(bc);
     }
docs: This method extracts data for a single calendar from an MSPDI file.
  
  @param calendar Calendar data
  @param map Map of calendar UIDs to names
  @param baseCalendars list of base calendars