我有这个时间戳1688452200
const startdate = new Date('1688452200')
const newstartDate = new Date(startdate.setMonth(startdate.getMonth() + 1));
console.log('newDate:', newstartDate);
const newStartDateTime = newstartDate.getTime();
我想添加1个月到这个时间戳,但这是行不通的
我有这个时间戳1688452200
const startdate = new Date('1688452200')
const newstartDate = new Date(startdate.setMonth(startdate.getMonth() + 1));
console.log('newDate:', newstartDate);
const newStartDateTime = newstartDate.getTime();
我想添加1个月到这个时间戳,但这是行不通的
3条答案
按热度按时间zujrkrfu1#
你需要一些东西在这里:
zi8p0yeb2#
gcxthw6b3#