- use that nifty new syntax for date/time strings

- get year properly :)


SVN revision: 5935
This commit is contained in:
bdsabian 2002-02-13 11:11:11 +00:00 committed by bdsabian
parent e3b4c7e88a
commit 501feae88e
2 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,7 @@ function clock_update(object data, number val){
}
if(hour==0) hour = 12;
data.setText(""+hour+" "+min+" "+seconds+" "+timeofday);
data.setText("$hour $min $seconds $timeofday");
epp.addTimer("clockTimer",0.5,"clock_update",0,data);
}

View File

@ -19,6 +19,7 @@ function time_update(object data, number val){
string date = Time.ctime(Time.time());
string month = String.copySection(date,4,7);
string day = String.copySection(date,8,10);
string year = String.copySection(date,20,24);
string time = String.copySection(date,11,20);
number hour = String.toLong(String.copySection(time,0,2));
string min = String.copySection(time,3,5);
@ -70,11 +71,11 @@ function time_update(object data, number val){
month = "December";
break;
}
dateObj.setText(month+" "+day+", 2002");
dateObj.setText("$month $day, $year");
}
data.setText(""+hour+" "+min+" "+seconds+" "+timeofday);
data.setText("$hour $min $seconds $timeofday");
epp.addTimer("clockTimer",0.5,"time_update",0,data);
}