美文网首页
js获取当前时间的前一天/后一天

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

作者: Mannixxx | 来源:发表于2020-04-29 11:11 被阅读0次

    Date curDate = new Date();

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

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

    相关文章

      网友评论

          本文标题:js获取当前时间的前一天/后一天

          本文链接:https://www.haomeiwen.com/subject/urlgwhtx.html