我希望根据一天生成本月的周数范围。 例如: 月开始日是星期五(01-08-2014),月末日是星期日(2014年8月31日),自定义日是星期二。
根据自定义日我动态生成周范围。
`var variable=[
{value:"01-08-2014 to 04-08-2014",name:"01-08-2014 to 04-08-2014"},
{value:"05-08-2014 to 11-08-2014",name:"05-08-2014 to 11-08-2014"},
{value:"12-08-2014 to 18-08-2014",name:"12-08-2014 to 18-08-2014"},
{value:"19-08-2014 to 25-08-2014",name:"19-08-2014 to 25-08-2014"},
{value:"26-08-2014 to 31-08-2014",name:"26-08-2014 to 31-08-2014"}
];`
另一个例子
假设自定义日是星期日,范围将变得像
`var variable=[
{value:"01-08-2014 to 02-08-2014",name:"01-08-2014 to 02-08-2014"},
{value:"03-08-2014 to 09-08-2014",name:"03-08-2014 to 09-08-2014"},
{value:"10-08-2014 to 16-08-2014",name:"10-08-2014 to 16-08-2014"},
{value:"17-08-2014 to 23-08-2014",name:"17-08-2014 to 23-08-2014"},
{value:"24-08-2014 to 30-08-2014",name:"24-08-2014 to 30-08-2014"},
{value:"31-08-2014 to 31-08-2014",name:"31-08-2014 to 31-08-2014"}
];`