//把json日期轉(zhuǎn)換為正常顯示的日期格式 function jsonDateToTime(jsondate) { var date = new Date(parseInt(jsondate.replace("/Date(", "").replace(")/", ""), 10)); var year = date.getYear() + 1900; var month = date.getMonth() + 1; var day = date.getDate(); var hour = date.getHours(); var minute = date.getMinutes(); var second = date.getSeconds(); var time = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second; return time; } |
|
來(lái)自: 修行的嘟嘟 > 《軟件開(kāi)發(fā)》