forked from enlightenment/enlightenment
- use that nifty new syntax for date/time strings
- get year properly :) SVN revision: 5935
This commit is contained in:
parent
e3b4c7e88a
commit
501feae88e
|
@ -27,7 +27,7 @@ function clock_update(object data, number val){
|
||||||
}
|
}
|
||||||
if(hour==0) hour = 12;
|
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);
|
epp.addTimer("clockTimer",0.5,"clock_update",0,data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ function time_update(object data, number val){
|
||||||
string date = Time.ctime(Time.time());
|
string date = Time.ctime(Time.time());
|
||||||
string month = String.copySection(date,4,7);
|
string month = String.copySection(date,4,7);
|
||||||
string day = String.copySection(date,8,10);
|
string day = String.copySection(date,8,10);
|
||||||
|
string year = String.copySection(date,20,24);
|
||||||
string time = String.copySection(date,11,20);
|
string time = String.copySection(date,11,20);
|
||||||
number hour = String.toLong(String.copySection(time,0,2));
|
number hour = String.toLong(String.copySection(time,0,2));
|
||||||
string min = String.copySection(time,3,5);
|
string min = String.copySection(time,3,5);
|
||||||
|
@ -70,11 +71,11 @@ function time_update(object data, number val){
|
||||||
month = "December";
|
month = "December";
|
||||||
break;
|
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);
|
epp.addTimer("clockTimer",0.5,"time_update",0,data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue