From 8a8bd816485b763a6f176a33dd1a0d027957935f Mon Sep 17 00:00:00 2001 From: James Macon <4700339+jamacon36@users.noreply.github.com> Date: Tue, 5 Apr 2022 08:24:09 -0400 Subject: [PATCH] hotfix for import dates --- js/dashboard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/dashboard.js b/js/dashboard.js index 261f815..ab8af56 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -190,7 +190,12 @@ lastImport() { if (!this.lastImportDate) return "N/A"; const lastImportDate = new Date(this.lastImportDate); - return `${lastImportDate.getMonth() + 1}/${lastImportDate.getDate()}/${lastImportDate.getFullYear()} @ ${lastImportDate.getHours()}:${lastImportDate.getMinutes()}`; + const month = lastImportDate.getMonth() + 1; // months are zero indexed + const day = lastImportDate.getDate(); + const year = lastImportDate.getFullYear(); + const hours = lastImportDate.getHours(); + const minutes = lastImportDate.getMinutes(); + return `${month}/${day}/${year} @ ${hours}:${minutes}`; }, importerStatus() { if (this.bulkImportActive) return "Active";