我正在寻找某个特定日期之后第100天的日期。有没有办法通过javascript做到这一点?
我希望它可以像下面一样简单,但是并不是那么简单。
var givenDay = new Date(01/01/2020);
var hundredthDay = new Date(birthday + 100);
console.log(hundrethDay)
我正在寻找某个特定日期之后第100天的日期。有没有办法通过javascript做到这一点?
我希望它可以像下面一样简单,但是并不是那么简单。
var givenDay = new Date(01/01/2020);
var hundredthDay = new Date(birthday + 100);
console.log(hundrethDay)
You can try using
.setDate()
and.getDate()
combination.Adding the required days to
.getDate()
as the following:我希望这有帮助!