Подправить скрипт смены дат

Есть скрипт который раз в сутки меняет дату в блоке.

document.querySelector("a[href='data']").setAttribute("id", "day");
document.querySelector("a[href='data2']").setAttribute("id", "day2");

var currentDate = new Date(new Date().getTime() + 24 * 60 * 60 * 1000);
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
document.getElementById("day").innerHTML = day + "." + month + "." + year;
document.getElementById("day2").innerHTML = day + "." + month + "." + year;
<a class="tn-atom" href="data" id="day"></a>
<a class="tn-atom" href="data2" id="day2"></a>

в данный момент скрипт показывает дату следующего дня, что правильно. нужно дополнить, что бы дата менялась в 17:00. К примеру, сейчас показывает 16.6.2020, а после 17:00 17.6.2020


Ответы (0 шт):