readableTime = function (ms) {
  if (isNaN(ms)) { return '?'; }

  const seconds = parseInt((ms / 1000) % 60);
  const minutes = parseInt((ms / (1000 * 60)) % 60);
  const hours = parseInt((ms / (1000 * 60 * 60)) % 24);
  const days = parseInt((ms / (1000 * 60 * 60 * 24)));

  let result = '';

  if (days) {
    result += days + ' day';
    if (days > 1) {
      result += 's ';
    } else {
      result += ' ';
    }
  }

  if (hours || minutes || seconds) {
    result += (hours < 10) ? '0' + hours : hours;
    result += ':';
    result += (minutes < 10) ? '0' + minutes : minutes;
    result += ':';
    result += (seconds < 10) ? '0' + seconds : seconds;
  }

  return result || '0';
}
Turns milliseconds into a human readable time range

@example
'{{ 1524680821790 | readableTime }}'
this.$options.filters.readableTime(1524680821790);

@param {int} ms    The time in ms from epoch
@returns {string}  The human readable time range
                   Output example: 1 day 10:42:01