const today = new Date();
const year = today.getFullYear();
const month = today.getMonth() + 1;
const day = today.getDate();
alert(year + "-" + month + "-" + day);  // "2026-1-5"