We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5b755e commit 8dc3e38Copy full SHA for 8dc3e38
templates/win98.html
@@ -417,7 +417,10 @@
417
const hours = String(now.getHours()).padStart(2, '0');
418
const minutes = String(now.getMinutes()).padStart(2, '0');
419
const ampm = Number(hours) >= 12 ? 'PM' : 'AM';
420
- const formattedTime = `${hours % 12 || 12}:${minutes} ${ampm}`;
+ const hours24 = now.getHours();
421
+ const minutes = String(now.getMinutes()).padStart(2, '0');
422
+ const ampm = hours24 >= 12 ? 'PM' : 'AM';
423
+ const formattedTime = `${(hours24 % 12) || 12}:${minutes} ${ampm}`;
424
425
document.querySelectorAll('.clock').forEach($el => $el.textContent = formattedTime);
426
};
0 commit comments