-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
70 lines (60 loc) · 2.39 KB
/
index.html
File metadata and controls
70 lines (60 loc) · 2.39 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Time Zone Converter</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Time Zone Converter</h1>
<!-- Clocks for quick reference -->
<button type="button" id="toggleClocks" class="toggle-btn small">Show Analog</button>
<div class="clocks">
<div class="clock" data-tz="UTC">
<h3>UTC</h3>
<span class="time"></span>
<canvas class="analog" width="100" height="100" style="display:none;"></canvas>
</div>
<div class="clock" data-tz="America/New_York">
<h3>New York</h3>
<span class="time"></span>
<canvas class="analog" width="100" height="100" style="display:none;"></canvas>
</div>
<div class="clock" data-tz="Europe/London">
<h3>London</h3>
<span class="time"></span>
<canvas class="analog" width="100" height="100" style="display:none;"></canvas>
</div>
<div class="clock" data-tz="Asia/Tokyo">
<h3>Tokyo</h3>
<span class="time"></span>
<canvas class="analog" width="100" height="100" style="display:none;"></canvas>
</div>
</div>
<!-- Converter form -->
<form id="converter">
<label id="timeInputLabel">
<span id="timeLabelText">Your Time:</span>
<input type="datetime-local" id="yourTime">
</label>
<button type="button" id="toggleDirection" class="toggle-btn" aria-label="Swap conversion">⇄</button>
<select id="direction" style="display:none">
<option value="yourToTheir">Your → Their</option>
<option value="theirToYour">Their → Your</option>
</select>
<label>
Their Location:
<input list="zones" id="theirLocation" placeholder="Start typing city or zone">
<datalist id="zones"></datalist>
</label>
</form>
<div class="result">
<div class="card"><strong id="leftLabel">Your Time:</strong> <span id="yourTimeDisplay"></span></div>
<div class="card"><strong id="rightLabel">Their Time:</strong> <span id="theirTimeDisplay"></span></div>
</div>
<p class="patreon card">If you find this simple tool helpful, feel free to support us on <a href="https://www.patreon.com/evolutionunleashedai" target="_blank">Patreon</a>!</p>
<script src="https://cdn.jsdelivr.net/npm/luxon@3/build/global/luxon.min.js"></script>
<script src="script.js"></script>
</body>
</html>