mirror of https://github.com/espruino/BangleApps
Implementing locale fix
parent
b87382906f
commit
a90b58bc0d
|
@ -4,4 +4,4 @@
|
|||
0.04: bug fix
|
||||
0.05: proper fix for the race condition in queueDraw()
|
||||
0.06: Tell clock widgets to hide.
|
||||
0.07: Better battery graphic - now has green, yellow and red sections; battery status reflected in the bar across the middle of the screen; better handling of locale
|
||||
0.07: Better battery graphic - now has green, yellow and red sections; battery status reflected in the bar across the middle of the screen; better handling of locale; current battery state checked only once every 15 minutes, leading to longer-lasting battery charge
|
||||
|
|
|
@ -28,17 +28,8 @@ function draw() {
|
|||
m = date.getMinutes();
|
||||
var d = date.getDate();
|
||||
var is12Hour = (require("Storage").readJSON("setting.json", 1) || {})["12hour"];
|
||||
var dow;
|
||||
|
||||
try {
|
||||
dow = require("locale").dow(date,1);
|
||||
} catch (e) {
|
||||
try {
|
||||
dow = require("date_utils").dows(0,1)[date.getDay()];
|
||||
} catch (e) {
|
||||
dow = ["SU","MO","TU","WE","TH","FR","SA"][date.getDay()];
|
||||
}
|
||||
}
|
||||
var dow = require("date_utils").dows(0,1)[date.getDay()];
|
||||
|
||||
if ((date.getTime() >= lastBattCheck + 15*60000) || Bangle.isCharging()) {
|
||||
lastBattcheck = date.getTime();
|
||||
width = E.getBattery();
|
||||
|
|
Loading…
Reference in New Issue