js获取指定日期的下一天日期


function  nextDate(date = new Date()) {
  date = new Date(date);
  date =  +date + 1000 * 60 * 60 * 24;
  date = new Date(date);
  return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
}
 
+date 返回日期的毫秒数,相当于 date.getTime()


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM