美文网首页
获取今天日期往后推一天

获取今天日期往后推一天

作者: 扶得一人醉如苏沐晨 | 来源:发表于2023-08-13 10:40 被阅读0次

function getNextDay() {
  let now = new Date(); //获取当前时间
  now.setDate(now.getDate() + 1);
  let year = now.getFullYear();
  let month = now.getMonth() + 1;
  month = month < 10 ? "0" + month : month;
  let day = now.getDate();
  return year + "-" + month + "-" + day;
}

相关文章

网友评论

      本文标题:获取今天日期往后推一天

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