code: public static boolean isNotModifiedSince(HttpServletRequest req, long dateLastModified) {
  
          // check if the request contains a last modified header
          try {
              long lastModifiedHeader = req.getDateHeader(CmsRequestUtil.HEADER_IF_MODIFIED_SINCE);
              // if last modified header is set (> -1), compare it to the requested resource
              return ((lastModifiedHeader > -1) && (((dateLastModified / 1000) * 1000) == lastModifiedHeader));
          } catch (Exception ex) {
              // some clients (e.g. User-Agent: BlackBerry7290/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/111)
              // send an invalid "If-Modified-Since" header (e.g. in german locale)
              // which breaks with http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
              // this has to be caught because the subsequent request for the 500 error handler
              // would run into the same exception.
              LOG.warn(
                  Messages.get().getBundle().key(
                      Messages.ERR_HEADER_IFMODIFIEDSINCE_FORMAT_3,
                      new Object[] {
                          CmsRequestUtil.HEADER_IF_MODIFIED_SINCE,
                          req.getHeader(CmsRequestUtil.HEADER_USER_AGENT),
                          req.getHeader(CmsRequestUtil.HEADER_IF_MODIFIED_SINCE)}));
          }
          return false;
      }
docs: Checks if the request has the "If-Modified-Since" header set, and if so,
  if the header date value is equal to the provided last modification date.<p>
  
  @param req the request to set the "If-Modified-Since" date header from
  @param dateLastModified the date to compare the header with
  
  @return <code>true</code> if the header is set and the header date is equal to the provided date