localize mclock date display
parent
c6db163e8f
commit
f1eefaac89
|
|
@ -1,3 +1,4 @@
|
|||
var locales = require("locale");
|
||||
// Offscreen buffer
|
||||
var buf = Graphics.createArrayBuffer(240,86,1,{msb:true});
|
||||
function flip() {
|
||||
|
|
@ -145,7 +146,7 @@ function draw(lastText,thisText,n) {
|
|||
buf.drawString(("0"+d.getSeconds()).substr(-2), x, y-8);
|
||||
// date
|
||||
buf.setFontAlign(0,-1);
|
||||
var date = d.toString().substr(0,15);
|
||||
var date = locales?locales.date(d,false):d.toString().substr(0,15);
|
||||
buf.drawString(date, buf.getWidth()/2, y+8);
|
||||
flip();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue