当前位置: 首页 > 工具软件 > T.js > 使用案例 >

js vue --- T Z 去掉 T Z 时间

孔鸿远
2023-12-01
export const formatDate = (timestamp) => {
  return timestamp.replace(/T/g,' ').replace(/Z/g,'')
}

毫秒级:

export const formatDate = (timestamp) => {
  return timestamp.replace(/T/g,' ').replace(/\.[\d]{3}Z/,'')
}

 

转载于:https://www.cnblogs.com/mafeng/p/10886856.html

 类似资料: