js 格式化日期 ("/Date(1400046388387)/")

var date = new Date(parseInt(str.replace(//Date((-?d+))//, '$1'))); var d= date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate()
原文地址:https://www.cnblogs.com/huhaihua/p/3736738.html