fixed bug with days not being or being displayed when they should / should not be displayed

This commit is contained in:
Dorian Zedler 2018-10-06 19:04:22 +02:00
parent e1f6864489
commit fc84ad904b

View file

@ -199,7 +199,7 @@ Page {
if(date.getDate() === today.getDate()){ if(date.getDate() === today.getDate()){
return("Heute") 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") return("Morgen")
} }
else { else {
@ -212,7 +212,7 @@ Page {
console.log(date.getTime()) console.log(date.getTime())
console.log(today.getTime()) console.log(today.getTime())
console.log("") 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())*/)
} }
} }
} }