let today = new Date();
let month = today.getMonth() + 1;
month = month < 10 ? "0" + month : month;
let days = today.getDate() < 10 ? "0" + today.getDate() : today.getDate();
today = today.getFullYear() + "-" + month + "-" + days;
console.log(today);