lib/common/sitemap.js
function stillCurrent (urlNode, options) {
  var lesser, greater, oPath;
  var now = Date.now();
  var lMod = _.first(urlNode.lastmod);
  var cFreq = _.first(urlNode.changefreq) ? _.first(urlNode.changefreq).toLowerCase() : null;

  // only lastmod specified
  if (lMod && !cFreq) {
    // if sitemap is malformed, just blow up
    oPath = base.outputFile(options, urlNode.loc[0]);

    lesser = now - ( (fs.existsSync(oPath) && fs.statSync(oPath).mtime.getTime()) || unixStart );
    greater = now - Date.parse(lMod);
  }
  // only changefreq specified
  else if (!lMod && cFreq) {
    // if sitemap is malformed, just blow up
    oPath = base.outputFile(options, urlNode.loc[0]);

    lesser = now - ( (fs.existsSync(oPath) && fs.statSync(oPath).mtime.getTime()) || unixStart );
    greater = changeFreq[cFreq] || changeFreq.always;
  }
  // both or neither were specified
  else {
    lesser = now - Date.parse(lMod || unixStart);
    greater = changeFreq[cFreq] || changeFreq.always;
  }

  return lesser <= greater;
}
function stillCurrent (urlNode, options) {
  var lesser, greater, oPath;
  var now = Date.now();
  var lMod = _.first(urlNode.lastmod);
  var cFreq = _.first(urlNode.changefreq) ? _.first(urlNode.changefreq).toLowerCase() : null;

  // only lastmod specified
  if (lMod && !cFreq) {
    // if sitemap is malformed, just blow up
    oPath = base.outputFile(options, urlNode.loc[0]);

    lesser = now - ( (fs.existsSync(oPath) && fs.statSync(oPath).mtime.getTime()) || unixStart );
    greater = now - Date.parse(lMod);
  }
  // only changefreq specified
  else if (!lMod && cFreq) {
    // if sitemap is malformed, just blow up
    oPath = base.outputFile(options, urlNode.loc[0]);

    lesser = now - ( (fs.existsSync(oPath) && fs.statSync(oPath).mtime.getTime()) || unixStart );
    greater = changeFreq[cFreq] || changeFreq.always;
  }
  // both or neither were specified
  else {
    lesser = now - Date.parse(lMod || unixStart);
    greater = changeFreq[cFreq] || changeFreq.always;
  }

  return lesser <= greater;
}
Return true if the urlNode is still current (not stale) by sitemap policy.
If both lastmod and changefreq tags are supplied both are used.
If only one of lastmod or changefreq are supplied,
then they are compared against previous output if it exists.
If a test fails for any reason, it is characterized as stale (returns false).

@param {Object} urlNode - Sitemap XML url node as an object.
@param {Object} options - Sitemap options object, passed through.