verticalclock 0.05: Stop hours being displayed wrong if moving from 2 digits to 1 (fix #516)

pull/518/head
Gordon Williams 2020-06-29 08:39:11 +01:00
parent 484f2c7eb2
commit 3f74e96bc5
3 changed files with 4 additions and 3 deletions

View File

@ -1900,7 +1900,7 @@
"name": "Vertical watch face",
"shortName":"Vertical Face",
"icon": "app.png",
"version":"0.04",
"version":"0.05",
"description": "A simple vertical watch face with the date.",
"tags": "clock",
"type":"clock",

View File

@ -1 +1,2 @@
0.04: Fixed day being displayed
0.05: Stop hours being displayed wrong if moving from 2 digits to 1 (fix #516)

View File

@ -8,7 +8,7 @@ function drawTimeDate() {
var h = d.getHours(), m = d.getMinutes(), day = d.getDate(), month = d.getMonth(), weekDay = d.getDay();
var daysOfWeek = ["SUN", "MON", "TUE","WED","THU","FRI","SAT"];
var hours = h;
var hours = (" "+h).substr(-2);
var mins= ("0"+m).substr(-2);
var date = `${daysOfWeek[weekDay]}|${day}|${("0"+(month+1)).substr(-2)}`;
@ -151,4 +151,4 @@ Bangle.on('HRM', function(hrm) {
//Bangle.on('step', function(up) {
// console.log("Step");
//});
//});