code: public ProjectCalendarException getException(Date date)
     {
        ProjectCalendarException exception = null;
  
        // We're working with expanded exceptions, which includes any recurring exceptions
        // expanded into individual entries.
        populateExpandedExceptions();
        if (!m_expandedExceptions.isEmpty())
        {
           sortExceptions();
  
           int low = 0;
           int high = m_expandedExceptions.size() - 1;
           long targetDate = date.getTime();
  
           while (low <= high)
           {
              int mid = (low + high) >>> 1;
              ProjectCalendarException midVal = m_expandedExceptions.get(mid);
              int cmp = 0 - DateHelper.compare(midVal.getFromDate(), midVal.getToDate(), targetDate);
  
              if (cmp < 0)
              {
                 low = mid + 1;
              }
              else
              {
                 if (cmp > 0)
                 {
                    high = mid - 1;
                 }
                 else
                 {
                    exception = midVal;
                    break;
                 }
              }
           }
        }
  
        if (exception == null && getParent() != null)
        {
           // Check base calendar as well for an exception.
           exception = getParent().getException(date);
        }
        return (exception);
     }
docs: Retrieve a calendar exception which applies to this date.
  
  @param date target date
  @return calendar exception, or null if none match this date