From b25713713b5842d93d7e3ecae6cac5d478bbab06 Mon Sep 17 00:00:00 2001 From: Shoshin Nikita Date: Sat, 6 Jun 2020 18:56:20 +0000 Subject: [PATCH 1/2] templates/search_spends.html: fix sort icons --- templates/search_spends.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/search_spends.html b/templates/search_spends.html index 85ca0847..d72c7422 100644 --- a/templates/search_spends.html +++ b/templates/search_spends.html @@ -360,10 +360,10 @@ Date
- + - +
@@ -371,10 +371,10 @@ Title
- + - +
@@ -384,10 +384,10 @@ Cost
- + - +
From d033702ae4d57f73f590f153570caf30ae1dcb10 Mon Sep 17 00:00:00 2001 From: Shoshin Nikita Date: Sat, 6 Jun 2020 19:00:17 +0000 Subject: [PATCH 2/2] templates/search_spends.html: use format 'yyyy-mm-dd' for dates --- templates/search_spends.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/search_spends.html b/templates/search_spends.html index d72c7422..ba01f761 100644 --- a/templates/search_spends.html +++ b/templates/search_spends.html @@ -398,7 +398,7 @@ {{ range .Spends }} - {{ printf "%02d" .Month }} / {{ printf "%02d" .Day }} / {{ .Year }} + {{ .Year }}-{{ printf "%02d" .Month }}-{{ printf "%02d" .Day }} {{ .Title }} {{ .Notes }} @@ -576,8 +576,8 @@ const originalDate = dates[i].textContent; let date = cache[originalDate]; if (!date) { - // Remove thin spaces and format like 'Friday, November 1, 2019' - date = new Date(originalDate.replace(/ /g, "", -1)).toLocaleDateString("en-US", dateFormatOptions); + // Format like 'Friday, November 1, 2019' + date = new Date(originalDate).toLocaleDateString("en-US", dateFormatOptions); cache[originalDate] = date; }