diff --git a/apps.json b/apps.json index 1d2c2ccd7..0c34f382d 100644 --- a/apps.json +++ b/apps.json @@ -1958,7 +1958,7 @@ "name": "Vertical watch face", "shortName":"Vertical Face", "icon": "app.png", - "version":"0.06", + "version":"0.07", "description": "A simple vertical watch face with the date. Heart rate monitor is toggled with BTN1", "tags": "clock", "type":"clock", diff --git a/apps/verticalface/ChangeLog b/apps/verticalface/ChangeLog index 4ba4f7ec4..e26120599 100644 --- a/apps/verticalface/ChangeLog +++ b/apps/verticalface/ChangeLog @@ -1,3 +1,4 @@ 0.04: Fixed day being displayed 0.05: Stop hours being displayed wrong if moving from 2 digits to 1 (fix #516) 0.06: Tweak sizing to allow widgets at top, and add widgets (fix #567) +0.07: Added leading zero to hours and minutes diff --git a/apps/verticalface/app.js b/apps/verticalface/app.js index 8503265ca..f9138335f 100644 --- a/apps/verticalface/app.js +++ b/apps/verticalface/app.js @@ -6,6 +6,14 @@ let currentHRM = "CALC"; function drawTimeDate() { var d = new Date(); var h = d.getHours(), m = d.getMinutes(), day = d.getDate(), month = d.getMonth(), weekDay = d.getDay(); + + if (h < 10) { + h = "0" + h; + } + + if (m < 10) { + m = "0" + h; + } var daysOfWeek = ["SUN", "MON", "TUE","WED","THU","FRI","SAT"]; var hours = (" "+h).substr(-2);