Skip to content

Commit

Permalink
Remove commented out code for displaying current time
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByAidan committed Jan 1, 2024
1 parent c19fa39 commit 58afa70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ <h1 id="date-text"></h1>
</div>
</div>
<footer>
<!-- <script type="text/javascript">
<script type="text/javascript">
setInterval(() => {
DisplayCurrentTime();
}, 1);
Expand All @@ -109,7 +109,7 @@ <h1 id="date-text"></h1>
var lblTime = document.getElementById("lblTime");
lblTime.innerHTML = time;
}
</script> -->
</script>
<div class="hvr-grow-shadow">
<span id="lblTime"></span>
</div>
Expand All @@ -122,7 +122,7 @@ <h1 id="date-text"></h1>
</section>
</div>
</div>
<!-- <script>
<script>
var myVar;

function myFunction() {
Expand All @@ -133,7 +133,7 @@ <h1 id="date-text"></h1>
document.getElementById("loader").style.display = "none";
document.getElementById("myDiv").style.display = "block";
}
</script> -->
</script>
</body>

</html>
25 changes: 0 additions & 25 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,28 +153,3 @@ window.addEventListener("load", () => {
displayDate(dd);
printWeatherInfo();
});

function DisplayCurrentTime() {
let date = new Date();
let hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
let am_pm = date.getHours() >= 12 ? "PM" : "AM";
hours = hours < 10 ? "0" + hours : hours;
let minutes =
date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
let seconds =
date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
let time = hours + ":" + minutes + ":" + seconds + " " + am_pm;
let lblTime = document.getElementById("lblTime");
lblTime.innerHTML = time;
}

let myVar;

function myFunction() {
myVar = setTimeout(showPage, 1000);
}

function showPage() {
document.getElementById("loader").style.display = "none";
document.getElementById("myDiv").style.display = "block";
}

1 comment on commit 58afa70

@vercel
Copy link

@vercel vercel bot commented on 58afa70 Jan 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

clocksite – ./

clocksite-livxy.vercel.app
clocksite-git-v2-livxy.vercel.app
clocksite.vercel.app

Please sign in to comment.