Merge pull request #580 from MalteKiefer/master

added leading zero to hours and minutes
master
Gordon Williams 2020-10-16 08:42:30 +01:00 committed by GitHub
commit 96f6801be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -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",

View File

@ -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

View File

@ -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);