function formatRelativeDate(timestamp) {
  const parsedDate = dayjs.unix(parseInt(timestamp, 10))
  if (!parsedDate.isValid()) {
    return 'invalid date'
  }
  return dayjs().to(parsedDate).toLowerCase()
}
Returns a relative date from the input timestamp.
For example, day after tomorrow's timestamp will return 'in 2 days'.

@param {number | string} timestamp - Unix timestamp
@returns {string} Relative date from the unix timestamp