Fix time and date lines

pull/3560/head
Martin Pool 2024-09-04 00:13:23 +02:00
parent 966452854e
commit 42947f27bc
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,5 @@
const storage = require("Storage"); const storage = require("Storage");
const locale = require('locale');
const SCREEN_WIDTH = g.getWidth(); const SCREEN_WIDTH = g.getWidth();
const SCREEN_HEIGHT = g.getHeight(); const SCREEN_HEIGHT = g.getHeight();
@ -125,11 +126,11 @@ function getBottomLines() {
const lines = []; const lines = [];
if (settings.showTime) { if (settings.showTime) {
lines.push(require("locale").time(date)); lines.push(locale.time(date, 1));
} }
if (settings.showDate) { if (settings.showDate) {
lines.push(`${date.getHours()}:${String(date.getMinutes()).padStart(2, '0')}`); lines.push(locale.date(date, 1));
} }
return lines; return lines;

View File

@ -3,7 +3,7 @@
"name": "Dutch Clock", "name": "Dutch Clock",
"shortName":"Dutch Clock", "shortName":"Dutch Clock",
"icon": "app.png", "icon": "app.png",
"version":"0.09", "version":"0.10",
"description": "A clock that displays the time the way a Dutch person would respond when asked what time it is.", "description": "A clock that displays the time the way a Dutch person would respond when asked what time it is.",
"type": "clock", "type": "clock",
"tags": "clock,dutch,text", "tags": "clock,dutch,text",