js日期格式化

function FormatDate (strTime) {
    var date = new Date(strTime);
    return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
}
FormatDate("Tue Jul 16 01:07:00 CST 2013");
原文地址:https://www.cnblogs.com/zhangxiaolei521/p/5103682.html