1
0
Fork 0

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
DerGuteWolf 2020-04-02 10:22:55 +02:00 committed by GitHub
parent f14772f3a9
commit ec1e6bda82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}