minor fix

This commit is contained in:
ivan 2024-06-21 12:17:23 +03:00
parent bd8a17b2cc
commit ee523822ed
1 changed files with 5 additions and 4 deletions

View File

@ -312,7 +312,7 @@ function makeTable(UTC, timeoutput) {
var now = new Date(); var now = new Date();
var utcoff = 0; var utcoff = 0;
var timeout = "erisian"; var timeout = "auto";
if (window.location.hash.slice(0,4) == "#UTC") { if (window.location.hash.slice(0,4) == "#UTC") {
if (utcs[window.location.hash.slice(1,9)]) { if (utcs[window.location.hash.slice(1,9)]) {
utcoff = utcs[window.location.hash.slice(1,9)] utcoff = utcs[window.location.hash.slice(1,9)]
@ -333,10 +333,11 @@ function makeTable(UTC, timeoutput) {
if (nextholiday == "next") var nextselector = ".nextyear>." + nextholiday; if (nextholiday == "next") var nextselector = ".nextyear>." + nextholiday;
else var nextselector = ".currentyear>." + nextholiday; else var nextselector = ".currentyear>." + nextholiday;
if (currentholiday) var curselector = ".currentyear>." + currentholiday;
document.querySelector(nextselector).style.color = "yellow"; document.querySelector(nextselector).style.color = "yellow";
document.querySelector(curselector).style.color = "red"; if (currentholiday) {
var curselector = ".currentyear>." + currentholiday;
document.querySelector(curselector).style.color = "red";
}
const dayOfYear = date => Math.floor((date - new Date(date.getFullYear(), const dayOfYear = date => Math.floor((date - new Date(date.getFullYear(),
0, 0)) / (1000 * 60 * 60 * 24)); 0, 0)) / (1000 * 60 * 60 * 24));
var daynumber = dayOfYear(new Date()); var daynumber = dayOfYear(new Date());