aclock: Fix broken date padding (fix #376)

master
Gordon Williams 2020-05-04 10:23:25 +01:00
parent 7c870a304f
commit 0d9eeab613
3 changed files with 3 additions and 2 deletions

View File

@ -180,7 +180,7 @@
{ "id": "aclock",
"name": "Analog Clock",
"icon": "clock-analog.png",
"version": "0.12",
"version": "0.13",
"description": "An Analog Clock",
"tags": "clock",
"type":"clock",

View File

@ -7,3 +7,4 @@
0.10: remove debug, refactor seconds to show elapsed secs each time app is displayed
0.11: shift face down for widget area, maximize face size, 0 pad single digit date, use locale for date
0.12: Fix regression after 0.11
0.13: Fix broken date padding (fix #376)

View File

@ -84,7 +84,7 @@ const drawDate = () => {
const dayString = locale.dow(currentDate, true);
// pad left date
const dateString = (currentDate.getDate() < 10) ? '0' : '' + currentDate.getDate().toString();
const dateString = ("0"+currentDate.getDate().toString()).substr(-2);
const dateDisplay = `${dayString}-${dateString}`;
// console.log(`${dayString}|${dateString}`);
// center date