获取当月天数

2024/4/23 19:31:21

微信小程序获取当月天数

/** * 获取当月的天数 */ getCurrentMonthOfDate(year,month) { var d new Date(year,month,0); return d.getDate(); }, //获取天数 var day this.getCurrentMonthOfDate(2020,11);