changed error where week began a day to late

changed an error where week 1 could occur multiple times
environments/production/deployments/5^2
Michael Arndt 2018-12-19 12:30:20 +01:00
parent 4d1e847512
commit 73df92809a
1 changed files with 2 additions and 2 deletions

View File

@ -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');