fixed date string
This commit is contained in:
parent
1007a0ec36
commit
e1f6864489
1 changed files with 3 additions and 2 deletions
|
@ -194,11 +194,12 @@ Page {
|
||||||
|
|
||||||
function getDateString(index){
|
function getDateString(index){
|
||||||
var date = _cppServerConn.getFoodPlanData(index).date
|
var date = _cppServerConn.getFoodPlanData(index).date
|
||||||
console.log(date)
|
console.log(date.getTime())
|
||||||
|
console.log(today.getTime())
|
||||||
if(date.getDate() === today.getDate()){
|
if(date.getDate() === today.getDate()){
|
||||||
return("Heute")
|
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")
|
return("Morgen")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Reference in a new issue