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))
1 console.log(state.weeknumber)
2 console.log(state.created_at.clone().add(7, "day").format("Do MMMM"))
3 console.log(state.weeknumber)
4 console.log(moment().day("monday").week(value).format("Do MMMM"))
5 console.log(moment().day("tuesday").week(value).format("Do MMMM"))
6 console.log(moment().day("wednesday").week(value).format("Do MMMM"))
7 console.log(moment().day("thursday").week(value).format("Do MMMM"))
8 console.log(moment().day("friday").week(value).format("Do MMMM"))
9 console.log(moment().day("saturday").week(value).format("Do MMMM"))
10 console.log(moment().day("sunday").week(value).add(7, "day").format("Do MMMM"))