vue 时间戳转换


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/, "")
}}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM