From 8ea66dcbd7cbbcfe088c18e3d85b5435a84abb8e Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Tue, 17 Jan 2023 17:43:48 -0700 Subject: [PATCH] Fixed Date --- slideshow/index.html | 2 +- slideshow/index.json | 4 ++-- slideshow/scripts/index.js | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/slideshow/index.html b/slideshow/index.html index eddb201..45c7b74 100644 --- a/slideshow/index.html +++ b/slideshow/index.html @@ -21,7 +21,7 @@ - + \ No newline at end of file diff --git a/slideshow/index.json b/slideshow/index.json index 1cfafc1..020c1ab 100644 --- a/slideshow/index.json +++ b/slideshow/index.json @@ -2,6 +2,6 @@ "ImageInterval": 9123, "JsonInterval": 59000, "ImageZero": "images/1x1_00000000.png", - "DataDirectory": "../Images - Results/F) Random/2021-11-03/[]", - "Root": "../Images - Results/C) Resize/2021-11-03/1920 x 1080/()" + "DataDirectory": "../Images - Results/F) Random/2022-09-22/[]", + "Root": "../Images - Results/C) Resize/2022-09-22/1920 x 1080/()" } \ No newline at end of file diff --git a/slideshow/scripts/index.js b/slideshow/scripts/index.js index 27d2c4b..bfa8a25 100644 --- a/slideshow/scripts/index.js +++ b/slideshow/scripts/index.js @@ -169,8 +169,10 @@ } function loadData() { - var isoString = new Date().toISOString(); - var url = _DataDirectory + '/' + isoString.substring(5, isoString.indexOf("T")) + '.json'; + var currentDate = new Date(); + var mm = (new Date().getMonth() + 1).toString().padStart(2, '0'); + var dd = currentDate.getDate().toString().padStart(2, '0'); + var url = _DataDirectory + '/' + mm + '-' + dd + '.json'; console.log(url); var _ = $.getJSON(url, function (data) { console.log("success", data.length);