export function getArrow(current: string | number, previous: string | number) {
  return Number(current) > Number(previous)
    ? 'arrow_up'
    : Number(current) === Number(previous)
      ? 'arrow_flat_orange'
      : 'arrow_down'
}

export function timeTool(second: string | number, isminute = false) {
  const seconds = Number(second)
  let h: number | string = Math.floor(seconds / 3600)
  let m: number | string = Math.floor((seconds % 3600) / 60)
  // 补零
  h = h < 10 ? '0' + h : h
  m = m < 10 ? '0' + m : m

  return isminute ? m : h
}
