Я хотел сделать что-то подобное, и это то, что я сделал
p.s. я знаю, что есть правильный ответ (ы) сверху, но просто хотел добавить что-то свое здесь
const todayIs = async () =>{
const now = new Date();
var today = now.getFullYear()+'-';
if(now.getMonth() < 10)
today += '0'+now.getMonth()+'-';
else
today += now.getMonth()+'-';
if(now.getDay() < 10)
today += '0'+now.getDay();
else
today += now.getDay();
return today;
}