summary refs log tree commit diff stats
path: root/timedate.js
diff options
context:
space:
mode:
authormounderfod <mounderfod@gmail.com>2023-06-22 19:19:12 +0100
committermounderfod <mounderfod@gmail.com>2023-06-22 19:19:12 +0100
commit5c18591e97d2035a19d7975a5678bf9aa7a38b1d (patch)
treeb4bb6d08fc129bfc83c3b5c87cb11b299b8825af /timedate.js
downloadwebsite-5c18591e97d2035a19d7975a5678bf9aa7a38b1d.tar.gz
Initial commit
Diffstat (limited to 'timedate.js')
-rw-r--r--timedate.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/timedate.js b/timedate.js
new file mode 100644
index 0000000..a9562ab
--- /dev/null
+++ b/timedate.js
@@ -0,0 +1,15 @@
+updateDate = () => {
+  const d = new Date();
+  $("#timedate").text(
+    `The time is ${(d.getHours() < 10 ? "0" : "") + d.getHours()}:${
+      (d.getMinutes() < 10 ? "0" : "") + d.getMinutes()
+    }:${
+      (d.getSeconds() < 10 ? "0" : "") + d.getSeconds()
+    } and the date is ${d.toLocaleString("en-us", {
+      weekday: "long",
+    })} ${d.getDate()} ${d.toLocaleString("en-us", {
+      month: "long",
+    })} ${d.getFullYear()}`
+  );
+};
+time = setInterval(updateDate, 1000);
6d5023083bc27a3fddaee8402ac94e5'>8fa87054 ^
a66c4a26 ^
8fa87054 ^
83868c7a ^
8fa87054 ^


a66c4a26 ^

f027adc0 ^
5c210a96 ^

3de15ddd ^

fb275079 ^

5c210a96 ^
3d566884 ^
e30d16cb ^
621a1a39 ^
9bc5d95c ^
c44b726e ^
465bff73 ^




f8e96a97 ^

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