mirror of
https://github.com/ced4568/ced-portfolio.git
synced 2026-08-13 06:44:02 +00:00
Fix date format
This commit is contained in:
@@ -54,7 +54,9 @@ async function loadNocStatus() {
|
|||||||
dot.className = "status-dot live";
|
dot.className = "status-dot live";
|
||||||
}
|
}
|
||||||
if (statusText) {
|
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) {
|
if (badge) {
|
||||||
badge.textContent = `Auto-refresh: 30s`;
|
badge.textContent = `Auto-refresh: 30s`;
|
||||||
|
|||||||
Reference in New Issue
Block a user