//计算一段工作日后,日期
getWorkday(dat, itervalByDay) {
function formatTen(f) {
if (parseInt(f, 10) < 10) {
return '0' + f;
}
return f;
}
let str = dat.split("-");
let date = new Date();
date.setUTCFullYear(str[0], str[1] - 1, str[2]);
date.setUTCHours(0, 0, 0, 0);
let millisceonds = date.getTime();
for (let i = 1; i <= itervalByDay; i++) {
millisceonds += 24 * 60 * 60 * 1000;
date.setTime(millisceonds);
}
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
return year + "-" + formatTen(month) + "-" + formatTen(day);
},