-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest-hours-finder-2.html
133 lines (109 loc) · 4.59 KB
/
test-hours-finder-2.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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Date</title>
<link href="https://wet-boew.github.io/themes-dist/GCWeb/GCWeb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="https://gc-proto.github.io/cra-contactus/GCWeb/css/theme.css">
<link rel="stylesheet" href="https://gc-proto.github.io/cra-contactus/GCWeb/css/custom.css">
</head>
<body>
<h1>Dates</h1>
<main class="container">
<details open>
<summary><h3>By phone</h3></summary>
<dl class="dl-horizontal">
<dt>Telephone number</dt>
<dd><p>1-800-959-8281</p><p>Outside Canada and US: 613-940-8495</p><p>Yukon, Northwest Territories and Nunavut: 1-866-426-1527</p></dd>
<dt>Hours</dt>
<dd>
<p><span id="oc">text</span> | Expected wait time: 1 hour or less</p>
<details>
<summary>Opening hours</summary>
<div class="row">
<div class="col-lg-6">
<table class="table">
<thead>
<tr>
<th class="wb-inv">Day</th>
<th class="wb-inv">Hours</th>
<th class="wb-inv">Wait times</th>
</tr>
</thead>
<tbody>
<tr>
<td>Mon</td>
<td>9 am to 5 pm</td>
<td>Long wait times</td>
</tr>
<tr>
<td>Tue</td>
<td>9 am to 5 pm</td>
<td>Long wait times</td>
</tr>
<tr>
<td>Wed</td>
<td>9 am to 5 pm</td>
<td>Medium wait times</td>
</tr>
<tr>
<td>Thu</td>
<td>9 am to 5 pm</td>
<td>Short wait times</td>
</tr>
<tr>
<td>Fri</td>
<td>9 am to 5 pm</td>
<td>Short wait times</td>
</tr>
<tr>
<td>Sat</td>
<td>Closed</td>
<td></td>
</tr>
<tr>
<td>Sun</td>
<td>Closed</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
<h4>Next 3 holiday closures:</h4>
<ul>
<li>March 30 (Volunteering)</li>
<li>April 2 (Bunny rabbits)</li>
<li>May 21 (Mayday)</li>
</ul>
</details>
</main>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="https://wet-boew.github.io/themes-dist/GCWeb/wet-boew/js/wet-boew.min.js"></script>
<script>
// start
var date = new Date();
var hour = date.getHours();
var day = date.getDay();
if(day === 0 ) {
document.getElementById("oc").innerHTML = '<label class="label label-danger">Closed until Monday</label>'; // day of the week
}
if(day === 6) {
document.getElementById("oc").innerHTML = '<label class="label label-danger">Closed until Monday</label>'; // day of the week
}
if(day === 1 && (hour >= 9 && hour <= 17)) {
document.getElementById("oc").innerHTML = '<label class="label label-success">Open until 5pm</label>'; // open time
} else if(day === 2 && (hour >= 9 && hour <= 17)) {
document.getElementById("oc").innerHTML = '<label class="label label-success">Open until 5pm</label>'; // open time
} else if(day === 3 && (hour >= 9 && hour <= 17)) {
document.getElementById("oc").innerHTML = '<label class="label label-success">Open until 5pm</label>'; // open time
} else if(day === 4 && (hour >= 9 && hour <= 17)) {
document.getElementById("oc").innerHTML = '<label class="label label-success">Open until 5pm</label>'; // open time
} else if(day === 5 && (hour >= 9 && hour <= 17)) {
document.getElementById("oc").innerHTML = '<label class="label label-success">Open until 5pm</label>'; // open time
} else {
document.write("<label class='label label-danger'>Closed until 9am</label>") // closed
}
</script>
</html>