Refactoring

This commit is contained in:
Fronbasal 2017-08-24 15:12:28 +02:00
parent f53f0713d4
commit ef1e1e7563

View File

@ -81,6 +81,7 @@ layout: default
} else { } else {
dayCountCurrent = 0; dayCountCurrent = 0;
console.log(dayStart.format(timeFormat));
dayCountCurrentStart = dayStart.clone(); dayCountCurrentStart = dayStart.clone();
dayCountClosed++; dayCountClosed++;
} }
@ -124,7 +125,9 @@ layout: default
var dayCountCurrentText = ""; var dayCountCurrentText = "";
var dayCountHighText = ""; var dayCountHighText = "";
if(dayCountCurrent > 1) console.log(dayCountCurrent);
if(dayCountCurrent > 1 || dayCountCurrent == 0)
dayCountCurrentText = dayCountCurrent + " days (" + dayCountCurrentStart.format(dateFormat) + " - " + dayCountCurrentEnd.format(dateFormat) + ")"; dayCountCurrentText = dayCountCurrent + " days (" + dayCountCurrentStart.format(dateFormat) + " - " + dayCountCurrentEnd.format(dateFormat) + ")";
else else
dayCountCurrentText = dayCountCurrent + " day (" + dayCountCurrentStart.format(dateFormat) + ")"; dayCountCurrentText = dayCountCurrent + " day (" + dayCountCurrentStart.format(dateFormat) + ")";