From e1f6864489dcbbd8326888870b31aa010aca5f6e Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sun, 23 Sep 2018 17:59:31 +0200 Subject: [PATCH] fixed date string --- qml/FoodPlanForm.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qml/FoodPlanForm.qml b/qml/FoodPlanForm.qml index bf75fa3..156774e 100644 --- a/qml/FoodPlanForm.qml +++ b/qml/FoodPlanForm.qml @@ -194,11 +194,12 @@ Page { function getDateString(index){ var date = _cppServerConn.getFoodPlanData(index).date - console.log(date) + console.log(date.getTime()) + console.log(today.getTime()) if(date.getDate() === today.getDate()){ return("Heute") } - else if(date.getTime() < (today.getTime() + 60 * 60 * 24 )/*date.getDate() === today.getDate() + 1 || (date.getDate() === 1 && date.getMonth() === today.getMonth() + 1)*/){ + else if(date.getTime() < (today.getTime() + (10* 60 * 60 * 60 * 24) )/*date.getDate() === today.getDate() + 1 || (date.getDate() === 1 && date.getMonth() === today.getMonth() + 1)*/){ return("Morgen") } else {