Implementing locale fix

pull/2145/head
deirdreobyrne 2022-09-26 16:01:23 +01:00
parent b87382906f
commit a90b58bc0d
2 changed files with 3 additions and 12 deletions

View File

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

View File

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