changed error where week began a day to late
changed an error where week 1 could occur multiple timesenvironments/production/deployments/5^2
parent
4d1e847512
commit
73df92809a
|
@ -19,7 +19,7 @@ export class Modi_Week{
|
|||
weeks[week] = {};
|
||||
weeks[week].data = [];
|
||||
weeks[week].start = md[1];
|
||||
weeks[week].num = moment(md[1]).diff(moment(anfang),'weeks')+1;
|
||||
weeks[week].num = moment(md[1]).diff(moment(anfang).startOf('isoWeek'),'weeks')+1;
|
||||
weeks[week].end = "";
|
||||
}
|
||||
var tasks = md[5].split(',');
|
||||
|
@ -71,7 +71,7 @@ export class Modi_Week{
|
|||
}
|
||||
|
||||
for(var w in weeks){
|
||||
weeks[w].start = moment(weeks[w].start).format('YYYY-MM-DD');
|
||||
weeks[w].start = moment(weeks[w].start).add(-1, "days").format('YYYY-MM-DD');
|
||||
weeks[w].end = moment(moment(weeks[w].start).day(7)).format('YYYY-MM-DD');
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue