12 PM Clock

Status
Not open for further replies.

qwert1515

SatelliteGuys TheList
Original poster
Sep 26, 2005
4,246
41
Los Angeles CA
Currently at during the 12 PM hour the clock says 00 instead of 12.

So if you can change the clock code in "function startTime()" I recommend that you change it from:
Code:
if (h >= 12) {
h -= 12
am_pm = "P.M."
}
else {
am_pm ="A.M."
}
to:
Code:
if (h > 12) {
h -= 12
am_pm = "P.M."
}
else if (h == 12) {
am_pm = "P.M."
}
else {
am_pm ="A.M."
}
Thanks,

Scott, I promise not to bug you anymore today :)
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Who Read This Thread (Total Members: 1)

Latest posts