简体   繁体   中英

ISO 8601 date format - Add day with javascript

How to add days to date with ISO 8601 Format using Javascript.

var date = new Date(2013, 9, 18, 18, 0, 0);
var myDate = date + 1

这将为日期增加一天:

date.setDate(date.getDate()+1);

Take a look at the api for Date over on MDN.

var date = new Date(2013, 9, 18, 18, 0, 0);
date.setDate(date.getDate() + 1);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM