Merge pull request #44 from schooldev49/main
Fix Nebula's clock not showing correct AM/PM time.
This commit is contained in:
commit
84105fe4ba
1 changed files with 3 additions and 2 deletions
|
|
@ -39,10 +39,11 @@ window.addEventListener("load", () => {
|
||||||
var m = date.getMinutes() // 0 - 59
|
var m = date.getMinutes() // 0 - 59
|
||||||
var s = date.getSeconds() // 0 - 59
|
var s = date.getSeconds() // 0 - 59
|
||||||
var session = "AM"
|
var session = "AM"
|
||||||
|
h = h == 12 ? 24 : h;
|
||||||
|
|
||||||
if (h == 0) {
|
if (h == 0) {
|
||||||
h = 12
|
h = 12
|
||||||
}
|
} else if (h >= 12) {
|
||||||
if (h > 12) {
|
|
||||||
h = h - 12
|
h = h - 12
|
||||||
session = "PM"
|
session = "PM"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue