getFullYear
getMonth
getDate
月を返します(0〜11、0 が 1 月)。
date.getMonth()
下記の値を入力するとサンプルに即時反映されます。
const
new
June
console
Jan
Jun
const date = new Date(2024, 5, 15); // June 15 console.log(date.getMonth()); // 5 (0=Jan, 5=Jun)