vue 时间戳转换

//显示小时和分钟
{{
  new Date(
    +new Date(new Date(itemC.StartTime).toJSON()) +
      8 * 3600 * 1000
  )
    .toISOString()
    .replace(/T/g, " ")
    .replace(/\.[\d]{3}Z/, "")
    .split(" ")[1]
    .slice(0, -3)
}}
//显示日时分
{{
  new Date(
    +new Date(new Date(itemC.StartTime).toJSON()) +
      8 * 3600 * 1000
  )
    .toISOString()
    .replace(/T/g, " ")
    .replace(/\.[\d]{3}Z/, "")
}}

相关文章:

  • 2022-12-23
  • 2021-12-05
  • 2021-11-19
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2022-01-11
  • 2022-12-23
  • 2021-12-30
  • 2021-11-01
相关资源
相似解决方案