code: public ProjectCalendarWeek getWorkWeek(Date date)
     {
        ProjectCalendarWeek week = null;
        if (!m_workWeeks.isEmpty())
        {
           sortWorkWeeks();
  
           int low = 0;
           int high = m_workWeeks.size() - 1;
           long targetDate = date.getTime();
  
           while (low <= high)
           {
              int mid = (low + high) >>> 1;
              ProjectCalendarWeek midVal = m_workWeeks.get(mid);
              int cmp = 0 - DateHelper.compare(midVal.getDateRange().getStart(), midVal.getDateRange().getEnd(), targetDate);
  
              if (cmp < 0)
              {
                 low = mid + 1;
              }
              else
              {
                 if (cmp > 0)
                 {
                    high = mid - 1;
                 }
                 else
                 {
                    week = midVal;
                    break;
                 }
              }
           }
        }
  
        if (week == null && getParent() != null)
        {
           // Check base calendar as well for a work week.
           week = getParent().getWorkWeek(date);
        }
        return (week);
     }
docs: Retrieve a work week which applies to this date.
  
  @param date target date
  @return work week, or null if none match this date