Skip to content

Commit

Permalink
Merge pull request #12 from tyrope/patch-1
Browse files Browse the repository at this point in the history
Update date at midnight, fixes #11 Thanks for the fix !
  • Loading branch information
zhivotnoya authored Oct 26, 2021
2 parents 5579bfe + e228d49 commit ab4faa7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions top-right.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@
s=d.getSeconds();
t=d.toLocaleString('en', {timeZoneName:'short'}).split(' ').pop();
clock();
day=d.getDate();
month=d.getMonth();
year=d.getFullYear();
updateDate();

};

Expand All @@ -117,6 +115,7 @@
h++;
if(h==24){
h=0;
updateDate();
}
}
}
Expand All @@ -132,6 +131,12 @@
$('callsign', callsign);
animate=setTimeout(clock,1000);
};

function updateDate(){
day=d.getDate();
month=d.getMonth();
year=d.getFullYear();
};

function $(id,val){
if(val<10){
Expand Down

0 comments on commit ab4faa7

Please sign in to comment.