我想在“下载”文件夹中创建一个为“我的图片”创建目录符号链接的批处理文件...
function getMonday(inputDate) {
let d = new Date(inputDate)
let out = []
// set to "Sunday" for the previous week
d.setDate(d.getDate() - (d.getDay() || 7)) // if getDay is 0 (Sunday), take 7 days
for (let i = 0; i < 7; i++) { // note, the value of i is unused
out.push(new Date(d.setDate(d.getDate() + 1))) // increment by one day
}
return out
}
const input = '2017-08-27T19:44:06'
console.info(getMonday(input).map(d => d.toString()))
但上述方法不起作用