mirror of https://github.com/espruino/BangleApps
Fix PM hours
parent
516814cdf8
commit
38f23be5b4
|
@ -1,4 +1,5 @@
|
|||
0.15: Initial release - be patient as this is the first try :)
|
||||
0.16: Fix timing
|
||||
0.17: Fix hours
|
||||
0.18: Code cleanup and major changes with seconds timing. New feature: if watch is locked, seconds get refreshed every 10 seconds.
|
||||
0.18: Code cleanup and major changes with seconds timing. New feature: if watch is locked, seconds get refreshed every 10 seconds.
|
||||
0.19: Fix PM Hours
|
|
@ -19,7 +19,6 @@ const font = "6x8";
|
|||
/* TODO: we could totally use 'Layout' here and
|
||||
avoid a whole bunch of hard-coded offsets */
|
||||
|
||||
|
||||
const xyCenter = g.getWidth() / 2;
|
||||
const xyCenterSeconds = xyCenter + (big ? 85 : 68);
|
||||
const yAmPm = xyCenter - (big ? 70 : 48);
|
||||
|
@ -171,7 +170,8 @@ function draw() {
|
|||
//do 12 hour stuff
|
||||
if (hours > 12) {
|
||||
ampm = "PM";
|
||||
hours = hours - 12;
|
||||
hours = hours - 12;
|
||||
if (hours < 10) hours = doublenum(hours);
|
||||
} else {
|
||||
ampm = "AM";
|
||||
}
|
||||
|
@ -200,8 +200,6 @@ function draw() {
|
|||
g.setFont("Vector", 17);
|
||||
g.drawString(require("locale").dow(new Date(), 1).toUpperCase() + ", " + localDate, xyCenter, yposDate, true);
|
||||
|
||||
|
||||
|
||||
g.setFont(font, primaryDateFontSize);
|
||||
// set gmt to UTC+0
|
||||
var gmt = new Date(d.getTime() + d.getTimezoneOffset() * 60 * 1000);
|
||||
|
@ -345,12 +343,4 @@ Bangle.on('lock',on=>{
|
|||
draw(); // draw immediately, queue redraw
|
||||
updatePos();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
|
@ -2,7 +2,7 @@
|
|||
"id": "hworldclock",
|
||||
"name": "Hanks World Clock",
|
||||
"shortName": "Hanks World Clock",
|
||||
"version": "0.18",
|
||||
"version": "0.19",
|
||||
"description": "Current time zone plus up to three others",
|
||||
"allow_emulator":true,
|
||||
"icon": "app.png",
|
||||
|
|
Loading…
Reference in New Issue