From 5e80924eb627d1063b30ca3169c4ea7cf1f4614f Mon Sep 17 00:00:00 2001 From: Theenoro Date: Sun, 5 May 2019 15:30:10 +0200 Subject: [PATCH] 2.3.0.2 - issues with the date in the new templates, major issue fixed with the start of the week which was changed in #73df92809ab2d7f291b1092ee839f84aeaceae3c --- public/templates/wochenbericht_2_wo_time.ptt | 2 +- src/jsx/ui/print_modi/week.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/templates/wochenbericht_2_wo_time.ptt b/public/templates/wochenbericht_2_wo_time.ptt index 9ba8b6a..cb18415 100644 --- a/public/templates/wochenbericht_2_wo_time.ptt +++ b/public/templates/wochenbericht_2_wo_time.ptt @@ -1004,7 +1004,7 @@ {% for day in week.data %} - +

{{day[1]}}

diff --git a/src/jsx/ui/print_modi/week.jsx b/src/jsx/ui/print_modi/week.jsx index b01c6bd..5022410 100644 --- a/src/jsx/ui/print_modi/week.jsx +++ b/src/jsx/ui/print_modi/week.jsx @@ -86,10 +86,11 @@ export class Modi_Week{ for(var w in weeks){ if(choosenTemplate != "wochenbericht"){ - weeks[w].start = moment(weeks[w].start).add(-1, "days").format('DD/MM/YYYY'); - weeks[w].end = moment(moment(weeks[w].start).day(7)).format('DD/MM/YYYY'); + var tmp = weeks[w].start; + weeks[w].start = moment(weeks[w].start).add(0, "days").format('DD/MM/YYYY'); + weeks[w].end = moment(moment(tmp).day(7)).format('DD/MM/YYYY'); }else{ - weeks[w].start = moment(weeks[w].start).add(-1, "days").format('YYYY-MM-DD'); + weeks[w].start = moment(weeks[w].start).add(0, "days").format('YYYY-MM-DD'); weeks[w].end = moment(moment(weeks[w].start).day(7)).format('YYYY-MM-DD'); }