-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.html
More file actions
46 lines (35 loc) · 1.47 KB
/
Copy pathprofile.html
File metadata and controls
46 lines (35 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<html>
<head>
<title>Stage One Task</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 data-testid="slackUserName">Mesoma Chukwumam</h1>
<h3 data-testid="myTrack" class="track">Frontend</h3>
<img src="IMG.jpeg" alt="Mimi" data-testid="slackDisplayImage">
<h3>Current Day of the week</h3>
<div class="date">
<p data-testid="currentDayOfTheWeek" id="currentDayOfTheWeek"></p>
<p data-testid="currentUTCTime" id="currentUTCTime"></p>
</div>
<a href="https://github.com/Mesomachukwu/"><button data-testid=“githubURL”>GitHub</button></a>
<script>
const weekday = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const d = new Date();
let day = weekday[d.getDay()];
document.getElementById("currentDayOfTheWeek").innerHTML = day;
function addZero(x, n){
while (x.toString().length < n){
x = "0" + x;
}
return x;
}
let h = addZero(d.getHours(), 2);
let m = addZero(d.getMinutes(), 2);
let s = addZero(d.getSeconds(), 2);
let ms = addZero(d.getMilliseconds(), 3);
let time = h + ":" + m + ":" + s + ":" + ms;
document.getElementById("currentUTCTime").innerHTML = time;
</script>
</body>
</html>