code: private void addException(ProjectCalendar mpxjCalendar, net.sf.mpxj.ganttproject.schema.Date date)
     {
        String year = date.getYear();
        if (year == null || year.isEmpty())
        {
           // In order to process recurring exceptions using MPXJ, we need a start and end date
           // to constrain the number of dates we generate.
           // May need to pre-process the tasks in order to calculate a start and finish date.
           // TODO: handle recurring exceptions
        }
        else
        {
           Calendar calendar = DateHelper.popCalendar();
           calendar.set(Calendar.YEAR, Integer.parseInt(year));
           calendar.set(Calendar.MONTH, NumberHelper.getInt(date.getMonth()));
           calendar.set(Calendar.DAY_OF_MONTH, NumberHelper.getInt(date.getDate()));
           Date exceptionDate = calendar.getTime();
           DateHelper.pushCalendar(calendar);
           ProjectCalendarException exception = mpxjCalendar.addCalendarException(exceptionDate, exceptionDate);
  
           // TODO: not sure how NEUTRAL should be handled
           if ("WORKING_DAY".equals(date.getType()))
           {
              exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_MORNING);
              exception.addRange(ProjectCalendarWeek.DEFAULT_WORKING_AFTERNOON);
           }
        }
     }
docs: Add a single exception to a calendar.
  
  @param mpxjCalendar MPXJ calendar
  @param date calendar exception