fix so noon is also marked as PM

SVN revision: 5931
This commit is contained in:
bdsabian 2002-02-13 09:29:08 +00:00 committed by bdsabian
parent 4f595ff6db
commit dcb669d3e3
1 changed files with 3 additions and 2 deletions

View File

@ -21,11 +21,12 @@ function clock_update(object data, number val){
string seconds = String.copySection(time,6,8);
string timeofday = "AM";
if(hour==0) hour = 12;
else if(hour>12){
if(hour>=12){
timeofday = "PM";
hour = hour - 12;
}
else if(hour==0) hour = 12;
data.setText(""+hour+" "+min+" "+seconds+" "+timeofday);
epp.addTimer("clockTimer",0.5,"clock_update",0,data);
}