export function paddingLeft(str: string, length = 2, pad = '0'): string {
  str = str.toString()
  if (str.length >= length)
    return str

  return paddingLeft(pad + str, length, pad)
}

export function timestamp2string(timestamp: string | number | Date) {
  return (new Date(timestamp)).toLocaleString()
}
