Jump to content

Widget:Time

From HigherEduSpot
Revision as of 11:18, 7 September 2025 by HigherEduSpot (talk | contribs) (Created page with "<span id="current-time" style="font-weight: bold; display: block; text-align: left; font-family: Arial; width: 340px;"></span> <script> function updateTime() { var now = new Date(); var options = {year: 'numeric', month: 'long', day: 'numeric', hour:'2-digit', minute:'2-digit', second:'2-digit'}; document.getElementById('current-time').textContent = now.toLocaleString('en-US', options); } updateTime(); setInterval(updateTime, 1000); </script>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<script> function updateTime() {

 var now = new Date();
 var options = {year: 'numeric', month: 'long', day: 'numeric', hour:'2-digit', minute:'2-digit', second:'2-digit'};
 document.getElementById('current-time').textContent = now.toLocaleString('en-US', options);

} updateTime(); setInterval(updateTime, 1000); </script>