diff options
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r-- | layouts/partials/footer.html | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 35dfe13..4574d1c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,27 @@ +<script> + var timer = setInterval(function() { + localTimer(); + }, 1000); + + function addZero(i) { + if (i < 10) { + i = "0" + i; + } + return i; + } + + function localTimer() { + var today = new Date(); + var time = addZero(today.getHours()) + ":" + addZero(today.getMinutes()) + ":" + addZero(today.getSeconds()); + document.getElementById("current_time").innerHTML = time; + + var date = today.getDate()+' . '+(today.getMonth()+1)+' . '+today.getFullYear(); + document.getElementById("current_date").innerHTML = date; +} +</script> + <!-- <footer> </footer> --->
\ No newline at end of file +--> |