js-tools时间处理

//把long值格式为字符串orm

function dateFormat(longTypeDate){
var dateTypeDate = "";
var date = new Date();
date.setTime(longTypeDate);
dateTypeDate += date.getFullYear(); //年
dateTypeDate += "-" + date.getMonth(); //月
dateTypeDate += "-" + date.getDay(); //日
return dateTypeDate;
}字符串