-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (32 loc) · 1.4 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="Slack.css">
<title>My Slack</title>
</head>
<body>
<div class="slack">
<h1 data-testid="slackUserName">duradev</h1>
<img src="slack.jpg" alt="duradev" data-testid="slackDisplayImage">
<p data-testid="currentDayOfTheWeek"></p>
<p data-testid="currentUTCTime"></p>
<p data-testid="myTrack">My track: Frontend</p>
<a href="https://github.com/Babapara" data-testid="githubURL">GitHub Repository</a>
</div>
<script>
function DayandTime() {
const currentDayOfTheWeek = document.querySelector('[data-testid="currentDayOfTheWeek"]');
const currentUTCTime = document.querySelector('[data-testid="currentUTCTime"]');
const today = new Date();
const Daysinaweek = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
const Dayoftheweek = Daysinaweek[today.getDay()];
currentDayOfTheWeek.textContent = `Day of the week: ${Dayoftheweek}`;
currentUTCTime.textContent = `UTC Time: ${today.getTime()} milliseconds`;
}
DayandTime();
setInterval(DayandTime, 1000);
</script>
</body>
</html>