js格式化日期

var date = new Date(strTime);
    return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate();
原文地址:https://www.cnblogs.com/guolsblog/p/6020249.html