📅  最后修改于: 2022-03-11 15:03:24.178000             🧑  作者: Mango
const formatDate = date => {
return (
date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
);
};
console.log(formatDate(new Date()));