ウェブ家の備忘録

ウェブデザイナーの備忘録

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