From fc84ad904be4fe27164ceef70298ba15152afd72 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sat, 6 Oct 2018 19:04:22 +0200 Subject: [PATCH] fixed bug with days not being or being displayed when they should / should not be displayed --- qml/FoodPlanForm.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qml/FoodPlanForm.qml b/qml/FoodPlanForm.qml index 156774e..b18ed60 100644 --- a/qml/FoodPlanForm.qml +++ b/qml/FoodPlanForm.qml @@ -199,7 +199,7 @@ Page { if(date.getDate() === today.getDate()){ return("Heute") } - else if(date.getTime() < (today.getTime() + (10* 60 * 60 * 60 * 24) )/*date.getDate() === today.getDate() + 1 || (date.getDate() === 1 && date.getMonth() === today.getMonth() + 1)*/){ + else if(date.getTime() < (today.getTime() + (24 * 60 * 60 * 1000) )/*date.getDate() === today.getDate() + 1 || (date.getDate() === 1 && date.getMonth() === today.getMonth() + 1)*/){ return("Morgen") } else { @@ -212,7 +212,7 @@ Page { console.log(date.getTime()) console.log(today.getTime()) console.log("") - return( date.getTime() > today.getTime()/*(date.getDate() >= today.getDate() && date.getMonth() >= today.getMonth()) || (date.getDate() < today.getDate() && date.getMonth() >= today.getMonth())*/) + return( date.getTime() > today.getTime() || date.getDate() === today.getDate()/*(date.getDate() >= today.getDate() && date.getMonth() >= today.getMonth()) || (date.getDate() < today.getDate() && date.getMonth() >= today.getMonth())*/) } } }