event log: js: clear interval when midnight passes
This commit is contained in:
parent
65215426c9
commit
f43b71a375
|
@ -7,12 +7,14 @@
|
|||
$(document).ready(function () {
|
||||
|
||||
// Update the Today and Yesterday labels after midnight
|
||||
setInterval (function(){
|
||||
var midnight_interval = setInterval (function(){
|
||||
var date = new Date();
|
||||
|
||||
if ((date.getTime() / 1000) >= <!-- $midnight -->) {
|
||||
$("#today").html($("#today").attr("name"));
|
||||
$("#yesterday").html($("#yesterday").attr("name"));
|
||||
|
||||
clearInterval(midnight_interval);
|
||||
}
|
||||
}, 60 * 1000);
|
||||
|
||||
|
|
Loading…
Reference in a new issue