js时间戳转时间日期格式“2019/11/29 下午5:56 “

  • Post author:
  • Post category:其他


new Date(parseInt(时间戳) * 1000).toLocaleString().replace(/:\d{1,2}$/,’ ‘);

例如:

new Date(parseInt(1575021369) * 1000).toLocaleString().replace(/:\d{1,2}$/,’ ‘);



版权声明:本文为caishijian2008原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。