/**
* 获取当天所在月的最后一天日期,和下一个月的第一天日期
* 调用getMonthDay(d), d默认值为01,d为要设置成的day;
*/
const getMonthMaxDay = () => {
var curDate = new Date();
var curMonth = curDate.getMonth();
/* 生成实际的月份: 由于curMonth会比实际月份小1, 故需加1 */
curDate.setMonth(curMonth + 1);
/* 将日期设置为0, 返回当月最后一天日期, 将日期设置为1,返回下一个月第一天日期*/
curDate.setDate(0);
/* 返回当月的天数 */
return curDate.getDate();
}
// 获取当前月中第某一天的日期
export const getMonthDay = (