我需要获取当前日期,然后做两件事。1)增加10天。2)增加5天。而且我也必须在周末离开。意味着当那天增加 10 时,如果出现任何周末,那么我必须离开那个。
我怎样才能做到这一点?
到目前为止,我所做的是:
$(document).ready(function() {
var d = new Date();
var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
month[7] = "August";
month[8] = "September";
month[9] = "October";
month[10] = "November";
month[11] = "December";
var n = month[d.getMonth()];
var dt = d.getDate();
$('#date_span').text(dt);
$('#month_span').text(n);
});