analytics.js
function convertDates (obj, convert) {
  obj = clone(obj);
  for (var key in obj) {
    var val = obj[key];
    if (is.date(val)) obj[key] = convert(val);
    if (is.object(val)) obj[key] = convertDates(val, convert);
  }
  return obj;
}
function convertDates (obj, convert) {
  obj = clone(obj);
  for (var key in obj) {
    var val = obj[key];
    if (is.date(val)) obj[key] = convert(val);
    if (is.object(val)) obj[key] = convertDates(val, convert);
  }
  return obj;
}
function convertDates ( obj , convert ) { obj = clone ( obj ) ; for ( var key in obj ) { var val = obj [ key ] ; if ( is . date ( val ) ) obj [ key ] = convert ( val ) ; if ( is . object ( val ) ) obj [ key ] = convertDates ( val , convert ) ; } return obj ; }
Recursively convert an `obj`'s dates to new values.

@param {Object} obj
@param {Function} convert
@return {Object}
Recursively convert an obj s dates to new values .