diff --git a/pages/index.html b/pages/index.html index f1b3206..788eb70 100644 --- a/pages/index.html +++ b/pages/index.html @@ -46,21 +46,13 @@ async function displayTodos(showDone) { // Display let timeCreated = new Date(item.timeCreatedUnix * 1000); - if (item.completionTimeUnix != 0) { - let timeDone = new Date(item.completionTimeUnix * 1000); + let timeDone = new Date(item.completionTimeUnix * 1000); + todosDiv.innerHTML += "" + item.text + "" + + "" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + " | " + + timeDone.getDate() + "/" + (timeDone.getMonth() + 1) + "/" + timeDone.getFullYear() + "" + + "" + ""; - todosDiv.innerHTML += "" + item.text + "" + - "" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + "" + - "" + " " + timeDone.getDate() + "/" + (timeDone.getMonth() + 1) + "/" + timeDone.getFullYear() + "" + - "" + ""; - } else { - todosDiv.innerHTML += "" + item.text + "" + - "" + " " + timeCreated.getDate() + "/" + (timeCreated.getMonth() + 1) + "/" + timeCreated.getFullYear() + "" + - "" + - "" + ""; - } todosDisplayed.push({item: item, buttonDel: todoDeleteBtnID});