mirror of https://github.com/espruino/BangleApps
Merge pull request #3726 from randyheydon/bwclk12
bwclk & bwclklite: Support 12-hour time format.master
commit
acb96b5d1e
|
@ -33,3 +33,4 @@ clkinfo.addInteractive that would cause ReferenceError.
|
||||||
0.31: Use clock_info module as an app
|
0.31: Use clock_info module as an app
|
||||||
0.32: Make the border of the clock_info box extend all the way to the right of the screen.
|
0.32: Make the border of the clock_info box extend all the way to the right of the screen.
|
||||||
0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
|
0.33: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
|
||||||
|
0.34: Support 12-hour time format
|
||||||
|
|
|
@ -239,11 +239,9 @@ let drawTime = function() {
|
||||||
var y = y1;
|
var y = y1;
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
|
|
||||||
var hours = String(date.getHours());
|
var timeStr = locale.time(date, 1);
|
||||||
var minutes = date.getMinutes();
|
if (settings.hideColon)
|
||||||
minutes = minutes < 10 ? String("0") + minutes : minutes;
|
timeStr = timeStr.replace(":", "");
|
||||||
var colon = settings.hideColon ? "" : ":";
|
|
||||||
var timeStr = hours + colon + minutes;
|
|
||||||
|
|
||||||
// Set y coordinates correctly
|
// Set y coordinates correctly
|
||||||
y += parseInt((H - y)/2) + 5;
|
y += parseInt((H - y)/2) + 5;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "bwclk",
|
"id": "bwclk",
|
||||||
"name": "BW Clock",
|
"name": "BW Clock",
|
||||||
"version": "0.33",
|
"version": "0.34",
|
||||||
"description": "A very minimalistic clock.",
|
"description": "A very minimalistic clock.",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
|
|
|
@ -36,3 +36,4 @@ clkinfo.addInteractive that would cause ReferenceError.
|
||||||
Do an quick inital fillRect on theclock info area.
|
Do an quick inital fillRect on theclock info area.
|
||||||
0.33: Make the border of the clock_info box extend all the way to the right of the screen.
|
0.33: Make the border of the clock_info box extend all the way to the right of the screen.
|
||||||
0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
|
0.34: Fix issue rendering ClockInfos with for fg+bg color set to the same (#2749)
|
||||||
|
0.35: Support 12-hour time format
|
||||||
|
|
|
@ -199,11 +199,9 @@ let drawTime = function() {
|
||||||
let y = y1;
|
let y = y1;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
|
|
||||||
let hours = String(date.getHours());
|
var timeStr = locale.time(date, 1);
|
||||||
let minutes = date.getMinutes();
|
if (settings.hideColon)
|
||||||
minutes = minutes < 10 ? String("0") + minutes : minutes;
|
timeStr = timeStr.replace(":", "");
|
||||||
let colon = settings.hideColon ? "" : ":";
|
|
||||||
let timeStr = hours + colon + minutes;
|
|
||||||
|
|
||||||
// Set y coordinates correctly
|
// Set y coordinates correctly
|
||||||
y += parseInt((H - y)/2) + 5;
|
y += parseInt((H - y)/2) + 5;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "bwclklite",
|
"id": "bwclklite",
|
||||||
"name": "BW Clock Lite",
|
"name": "BW Clock Lite",
|
||||||
"version": "0.34",
|
"version": "0.35",
|
||||||
"description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.",
|
"description": "A very minimalistic clock. This version of BW Clock is quicker at the cost of the custom font.",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
|
|
Loading…
Reference in New Issue