Date.prototype.toCommonCase=function(){
var xYear=this.getYear();
xYear=xYear+1900;
var xMonth=this.getMonth()+1;
if(xMonth<10){
xMonth="0"+xMonth;
}
var xDay=this.getDate();
if(xDay<10){
xDay="0"+xDay;
}
return xYear+"-"+xMonth+"-"+xDay;
} //转化日期到标准格式
if (item.publish_time != null) {
var dur = item.duration;
var d = new Date(item.publish_time);
var endDate=new Date(item.publish_time);
endDate.setDate(d.getDate() + dur);
out += "<tr><td>截止日期</td><td>" + endDate.toCommonCase() + "</td></tr>";
}