Dateの「月」と「曜日」について

by yshrkn

JavaScript

var aDay = new Date('2017-04-23');
console.log(aDay.getMonth()); // 月の値を返す(0:1月、11:12月)
console.log(aDay.getDay());   // 曜日を返す(0:日曜、 6:土曜)