From 738dafdf6302f5f9aa6c9e738819bfcad6cffb20 Mon Sep 17 00:00:00 2001 From: Chase Dumphord Date: Sun, 3 May 2026 14:57:03 -0500 Subject: [PATCH] Format NOC timestamp to readable date --- script.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index a907d9a..33a6b67 100644 --- a/script.js +++ b/script.js @@ -54,7 +54,9 @@ async function loadNocStatus() { dot.className = "status-dot live"; } if (statusText) { - statusText.textContent = `${data.nocName} — ${data.status} — Last updated: ${data.lastUpdated}`; + const d = new Date(data.lastUpdated); + const formatted = d.toLocaleString('en-US', { month: 'long', day: 'numeric', year: 'numeric', hour: 'numeric', minute: '2-digit', hour12: true }); + statusText.textContent = `${data.nocName} — ${data.status} — Last updated: ${formatted}`; } if (badge) { badge.textContent = `Auto-refresh: 30s`;