lib/common/misc.js
function getMostRecentRefresh(formLastUpdated, dataLastUpdated) {
  var formTimestamp = new Date(formLastUpdated).getTime();
  var dataTimestamp = new Date(dataLastUpdated).getTime();

  if (!dataLastUpdated) {
    return formLastUpdated;
  }

  if (dataTimestamp > formTimestamp) {
    return dataLastUpdated;
  } else {
    return formLastUpdated;
  }
}
function getMostRecentRefresh(formLastUpdated, dataLastUpdated) {
  var formTimestamp = new Date(formLastUpdated).getTime();
  var dataTimestamp = new Date(dataLastUpdated).getTime();

  if (!dataLastUpdated) {
    return formLastUpdated;
  }

  if (dataTimestamp > formTimestamp) {
    return dataLastUpdated;
  } else {
    return formLastUpdated;
  }
}
function getMostRecentRefresh ( formLastUpdated , dataLastUpdated ) { var formTimestamp = new Date ( formLastUpdated ) . getTime ( ) ; var dataTimestamp = new Date ( dataLastUpdated ) . getTime ( ) ; if ( ! dataLastUpdated ) { return formLastUpdated ; } if ( dataTimestamp > formTimestamp ) { return dataLastUpdated ; } else { return formLastUpdated ; } }
Function to compare to timestamps and return the most recent.
Function to compare to timestamps and return the most recent .