function formatUpdateTime(updateTime) {
  var lastOnline = new Date(updateTime);
  var now = new Date();
  var displayString = '';
  if (now.getFullYear() == lastOnline.getFullYear() &&
      now.getMonth() == lastOnline.getMonth() &&
      now.getDate() == lastOnline.getDate()) {
    return lastOnline.toLocaleTimeString();
  } else {
    return lastOnline.toLocaleDateString();
  }
}
/**
 * Formats host's updateTime value relative to current time (i.e. only
 * displaying hours and minutes if updateTime is less than a day in the past).
 * @param {string} updateTime RFC 3339 formatted date-time value.
 * @return {string} Formatted value (i.e. 11/11/2014)
 */
Formats host's updateTime value relative to current time .
@param {string} updateTime RFC 3339 formatted date-time value.
@return {string} Formatted value
Formats host ' s updateTime value relative to current time . @param { string } updateTime RFC 3339 formatted date - time value . @return { string } Formatted value
function formatUpdateTime(updateTime) {
  var lastOnline = new Date(updateTime);
  var now = new Date();
  var displayString = '';
  if (now.getFullYear() == lastOnline.getFullYear() &&
      now.getMonth() == lastOnline.getMonth() &&
      now.getDate() == lastOnline.getDate()) {
    return lastOnline.toLocaleTimeString();
  } else {
    return lastOnline.toLocaleDateString();
  }
}
function formatUpdateTime ( updateTime ) { var lastOnline = new Date ( updateTime ) ; var now = new Date ( ) ; var displayString = '' ; if ( now . getFullYear ( ) == lastOnline . getFullYear ( ) && now . getMonth ( ) == lastOnline . getMonth ( ) && now . getDate ( ) == lastOnline . getDate ( ) ) { return lastOnline . toLocaleTimeString ( ) ; } else { return lastOnline . toLocaleDateString ( ) ; } }
Formats host's updateTime value relative to current time (i.e.
Formats host ' s updateTime value relative to current time ( i . e .