function date(time) { let date = new Date(time); let y = date.getFullYear() let m = date.getMonth() + 1 m = m < 10 ? '0' + m : m let d = date.getDate() d = d < 10 ? ('0' + d) : d return y + '-' + m + '-' + d }
function date(time) { let date = new Date(time); let y = date.getFullYear() let m = date.getMonth() + 1 m = m < 10 ? '0' + m : m let d = date.getDate() d = d < 10 ? ('0' + d) : d return y + '-' + m + '-' + d }