code: private void readCalendar(Calendar calendar)
     {
        // Create the calendar
        ProjectCalendar mpxjCalendar = m_projectFile.addCalendar();
        mpxjCalendar.setName(calendar.getName());
  
        // Default all days to working
        for (Day day : Day.values())
        {
           mpxjCalendar.setWorkingDay(day, true);
        }
  
        // Mark non-working days
        List<NonWork> nonWorkingDays = calendar.getNonWork();
        for (NonWork nonWorkingDay : nonWorkingDays)
        {
           // TODO: handle recurring exceptions
           if (nonWorkingDay.getType().equals("internal_weekly"))
           {
              mpxjCalendar.setWorkingDay(nonWorkingDay.getWeekday(), false);
           }
        }
  
        // Add default working hours for working days
        for (Day day : Day.values())
        {
           if (mpxjCalendar.isWorkingDay(day))
           {
              ProjectCalendarHours hours = mpxjCalendar.addCalendarHours(day);
              hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
              hours.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
           }
        }
     }
docs: This method extracts data for a single calendar from a Phoenix file.
  
  @param calendar calendar data