2019-09-11 Javascriptでその月の日数を計算する JavaScript function days(year, month) { return new Date(parseInt(year, 10), parseInt(month, 10), 0).getDate(); } https://www.softel.co.jp/blogs/tech/archives/4901