js获取当前时间的前一天/后一天

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

posted @ 2018-01-08 15:20  Olivia_Guo  阅读(2876)  评论(0编辑  收藏  举报