获取月份的天数

var date = new Date(2019,8,0).getDate();
console.log(`2019年8月份有${date}天`);

 

你可能感兴趣的:(js)