Date(当前时间加一天)

let nextdate = new Date( new Date(). setDate( new Date(). getDate() + 1));
let nY = nextdate. getFullYear() + '-';
let nM = (nextdate. getMonth() + 1 < 10 ? '0' +(nextdate. getMonth() + 1) : nextdate. getMonth() + 1) + '-';
let nD = (nextdate. getDate() < 10 ? '0' +(nextdate. getDate()) : nextdate. getDate()) + ' ';
let nh = nextdate. getHours() + ':';
let nm = nextdate. getMinutes() + ':';
let ns = nextdate. getSeconds();

猜你喜欢

转载自blog.csdn.net/qq_39237755/article/details/79769224