Fixed Date

This commit is contained in:
Mike Phares 2023-01-17 17:43:48 -07:00
parent c15f56739a
commit 8ea66dcbd7
3 changed files with 7 additions and 5 deletions

View File

@ -21,7 +21,7 @@
<script src="scripts/jquery-1.9.1.min.js"></script>
<script src="scripts/bootstrap.min.js"></script>
<script src="scripts/jquery.bgswitcher.js"></script>
<script type="text/javascript" src="scripts/index.js?nocache=2022_02_12_06_16_PM"></script>
<script type="text/javascript" src="scripts/index.js?nocache=2023_01_17_05_34_PM"></script>
</body>
</html>

View File

@ -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/()"
}

View File

@ -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);