forked from FOSS/BangleApps
Take into account discussion from #167
Using now weekday abbrev, space, short dateformat with full-year removed. This should work for most locales (I hardcoded also replacing a trailing slash esp for en_IL and fr_FR)master
parent
f14772f3a9
commit
ec1e6bda82
|
@ -285,7 +285,10 @@ function drawTime() {
|
|||
function drawDate() {
|
||||
g.setFont("6x8");
|
||||
g.setColor(LIGHTEST);
|
||||
const dateStr = locale.date(new Date(), true);
|
||||
let d = new Date();
|
||||
let dateStr = locale.date(d, true);
|
||||
dateStr = dateStr.replace(d.getFullYear(), "").trim().replace(/\/$/i,"");
|
||||
dateStr = locale.dow(d, true) + " " + dateStr;
|
||||
g.drawString(dateStr, (W - g.stringWidth(dateStr))/2, 0, true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue