code: protected boolean isInTimeRange(Document doc, CmsSearchParameters params) {
  
          if (!isCheckingTimeRange()) {
              // time range check disabled
              return true;
          }
  
          try {
              // check the creation date of the document against the given time range
              Date dateCreated = DateTools.stringToDate(doc.getField(CmsSearchField.FIELD_DATE_CREATED).stringValue());
              if (dateCreated.getTime() < params.getMinDateCreated()) {
                  return false;
              }
              if (dateCreated.getTime() > params.getMaxDateCreated()) {
                  return false;
              }
  
              // check the last modification date of the document against the given time range
              Date dateLastModified = DateTools.stringToDate(
                  doc.getField(CmsSearchField.FIELD_DATE_LASTMODIFIED).stringValue());
              if (dateLastModified.getTime() < params.getMinDateLastModified()) {
                  return false;
              }
              if (dateLastModified.getTime() > params.getMaxDateLastModified()) {
                  return false;
              }
  
          } catch (ParseException ex) {
              // date could not be parsed -> doc is in time range
          }
  
          return true;
      }
docs: Checks if the document is in the time range specified in the search parameters.<p>
  
  The creation date and/or the last modification date are checked.<p>
  
  @param doc the document to check the dates against the given time range
  @param params the search parameters where the time ranges are specified
  
  @return true if document is in time range or not time range set otherwise false