Show 1 day since when there was an incident yesterday.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera 2016-11-21 17:49:55 -08:00
parent b475ebbf33
commit b961f390e8
No known key found for this signature in database
GPG Key ID: DE3D437CCBECE2C4

View File

@ -8,6 +8,6 @@ if (daysSince) {
const timeSince = new Date() - new Date(dateSince);
const endDays = Math.floor(timeSince / aDay);
console.log(endDays);
daysSince.innerHTML = `${endDays} days since last incident`
const count = endDays == 1 ? `${endDays} day` : `${endDays} days`;
daysSince.innerHTML = `${count} since last incident`;
}