Date curDate = new Date();var preDate = new Date(curDate.getTime() - 24*60*60*1000); //前一天var nextDate = new Date(curDate.getTime() + 24*60*60*1000); //后一天