首页 > Web开发 > 详细

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

时间:2019-05-18 20:08:39      阅读:837      评论:0      收藏:0      [点我收藏+]
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/,‘‘)
 }

 

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

原文:https://www.cnblogs.com/mafeng/p/10886856.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!