1var dateformat = "YYYY/MM/DD";
2function getWeekDaysByWeekNumber(weeknumber)
3{
4 var date = moment().isoWeek(weeknumber||1).startOf("week"), weeklength=7, result=[];
5 while(weeklength--)
6 {
7 result.push(date.format(dateformat));
8 date.add(1,"day")
9 }
10 return result;
11}
12
13console.log(getWeekDaysByWeekNumber())
14console.log(getWeekDaysByWeekNumber(2))
15console.log(getWeekDaysByWeekNumber(25))