根据当前时间 获取前一个月后一个月
const lastMonth = new Date();
lastMonth.setMonth(new Date().getMonth() - 1)
//格式话 使用的时候也只能用lastMonth.Format('yyyyMM') 不能直接用lastMonth
//否则,还是未格式话之前的
alert(lastMonth.Format('yyyyMM'))//202007
//当前时间的前一个星期
new Date().setDate(new Date().getDate() - 7), new Date().getTime()
//当前时间的前一个月
new Date().setMonth(new Date().getMonth() - 1)