From e7c14465affc27f86a86f9d030f006b7582a74df Mon Sep 17 00:00:00 2001 From: schooldev49 <102310270+schooldev49@users.noreply.github.com> Date: Wed, 7 Dec 2022 21:11:21 -0500 Subject: [PATCH 1/2] Update nebulamain.js --- static/resources/nebulamain.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/resources/nebulamain.js b/static/resources/nebulamain.js index ce9ef867..99b2d76c 100644 --- a/static/resources/nebulamain.js +++ b/static/resources/nebulamain.js @@ -42,7 +42,9 @@ window.addEventListener("load", () => { if (h == 0) { h = 12 } - if (h > 12) { + h = h == 12 ? 24 : h; + + if (h >= 12) { h = h - 12 session = "PM" } From 3675f1169ea5393a496f61cec4fcd27bf2d45977 Mon Sep 17 00:00:00 2001 From: schooldev49 <102310270+schooldev49@users.noreply.github.com> Date: Wed, 7 Dec 2022 21:15:46 -0500 Subject: [PATCH 2/2] Update nebulamain.js --- static/resources/nebulamain.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/resources/nebulamain.js b/static/resources/nebulamain.js index 99b2d76c..b71df069 100644 --- a/static/resources/nebulamain.js +++ b/static/resources/nebulamain.js @@ -39,12 +39,11 @@ window.addEventListener("load", () => { var m = date.getMinutes() // 0 - 59 var s = date.getSeconds() // 0 - 59 var session = "AM" - if (h == 0) { - h = 12 - } h = h == 12 ? 24 : h; - if (h >= 12) { + if (h == 0) { + h = 12 + } else if (h >= 12) { h = h - 12 session = "PM" }