Skip to content

Commit

Permalink
Update test2.html
Browse files Browse the repository at this point in the history
  • Loading branch information
SooDragon authored Jun 21, 2021
1 parent 2ce94a8 commit f35cd93
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions test2.html
Original file line number Diff line number Diff line change
@@ -1,61 +1,5 @@
<html>

<script src="http://gist-it.appspot.com/http://github.com/geekbleofficial/UltrasonicAlarm/blob/main/SpeakerModule/SpeakerModule.ino"></script>


<head>
<title>Greeting Message</title>
<style>
#lbl {
font-family: monospace;
font-size: xx-large;
color: #626262;
padding: 5px;
border: 1px solid #ececec;
text-align: center;
line-height: 1.5;
height:85%


}
#date{
font-size:large;
}
body{
background-color: aliceblue;
}
</style>
</head>
<body>
<div id="lbl"></div>
</body>

<script>
var weekday = new Array(7);
weekday[0] = "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";


var today = new Date();
var hrs = today.getHours();
var dayOfWeek = weekday[today.getDay()];
var date = dayOfWeek+" " + today.getDate() + "/" +(today.getMonth()+1) +'/'+today.getFullYear() ;

var greet;

if (hrs < 12)
greet = 'Good Morning ';
else if (hrs >= 12 && hrs <= 17)
greet = 'Good Afternoon ';
else if (hrs >= 17 && hrs <= 24)
greet = 'Good Evening ';

document.getElementById('lbl').innerHTML =
greet+=`<div id="date"> It's ${date}</div>`;
</script>
</html>

0 comments on commit f35cd93

Please sign in to comment.