// let dd = new Date(1635063389000);
// var year = dd.getFullYear();
// var month = (dd.getMonth() + 1) < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth();
// var day = (dd.getDay()) < 10 ? "0" + (dd.getDay()) : dd.getDay();
// console.log(dd.getDay())
// var handleDate = year + "-" + month + "-" + day;
// console.log(handleDate)
function add0(m){return m<10?'0'+m:m }
function format()
{
//shijianchuo是整数,否则要parseInt转换
var time = new Date(1633276800000);
var y = time.getFullYear();
var m = time.getMonth()+1;
var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
return y+'-'+add0(m)+'-'+add0(d);
}
console.log(format())
console