I also fixed the code slightly so that between midnight and 1 am the clock says 12 and between noon and 1pm the clock says PM, also normally at 1:30pm in Western countries we don't write 01:30pm so I removed that bit.:
this is the portion of code I changed from this:
Code:
var AM_PM;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h>12) {h-=12;AM_PM = "PM"}
else {AM_PM="AM"}
if (h<10) {h="0" + h}
to this:
Code:
var AM_PM;
if (s<10) {s="0" + s}
if (m<10) {m="0" + m}
if (h<12) {AM_PM = "AM"}
else {AM_PM="PM"}
if (h<1) {h+=12}
if (h>12) {h-=12}