From ec1e6bda82dbd3110899054cc316f1bc7533459e Mon Sep 17 00:00:00 2001 From: DerGuteWolf Date: Thu, 2 Apr 2020 10:22:55 +0200 Subject: [PATCH 1/3] 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) --- apps/marioclock/marioclock-app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/marioclock/marioclock-app.js b/apps/marioclock/marioclock-app.js index c0ada5e59..ecbaba38a 100644 --- a/apps/marioclock/marioclock-app.js +++ b/apps/marioclock/marioclock-app.js @@ -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); } From 9d136b2e28b37f68a5961aede5c62da1a0ae8e0a Mon Sep 17 00:00:00 2001 From: DerGuteWolf Date: Thu, 2 Apr 2020 10:25:22 +0200 Subject: [PATCH 2/3] Update ChangeLog --- apps/marioclock/ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/marioclock/ChangeLog b/apps/marioclock/ChangeLog index 79f103c48..4334ad92c 100644 --- a/apps/marioclock/ChangeLog +++ b/apps/marioclock/ChangeLog @@ -1,3 +1,4 @@ 0.01: Create mario app 0.02: Fix day of the week and add padding 0.03: use short date format from locale, take timeout from settings +0.04: modify date to display to be more at the original idea but still localized From 291342ea16d4a429ee9b3885e1299f0440dc2da1 Mon Sep 17 00:00:00 2001 From: DerGuteWolf Date: Thu, 2 Apr 2020 10:26:13 +0200 Subject: [PATCH 3/3] marioclock version 0.04 --- apps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps.json b/apps.json index 019573266..1c1bf8c5c 100644 --- a/apps.json +++ b/apps.json @@ -892,7 +892,7 @@ { "id": "marioclock", "name": "Mario Clock", "icon": "marioclock.png", - "version":"0.03", + "version":"0.04", "description": "Animated Mario clock, jumps to change the time!", "tags": "clock,mario,retro", "type": "clock",