jQuery将时间戳转换为字符串

var stime = data[0].start_time;     //stime='/Date(1460649600000)/'
var start = eval('new ' + stime.substr(1, stime.length - 2));    //start='Fri Apr 15 2016 00:00:00 GMT+0800 (中国标准时间)'
var start_time = [start.getFullYear() + '-' + (start.getMonth() + 1) + '-' + start.getDate()];

 

posted @ 2016-04-16 18:55  水上飘0901  阅读(2890)  评论(0编辑  收藏  举报