mirror of https://github.com/espruino/BangleApps
Shows day of month
parent
91cab3aee4
commit
6bded83f77
|
@ -2,3 +2,4 @@
|
|||
0.02: Now tells time!
|
||||
0.03: Interaction
|
||||
0.04: Shows day of week
|
||||
0.05: Shows day of month
|
||||
|
|
|
@ -10,7 +10,7 @@ The format of the bars are
|
|||
* H: Hours
|
||||
* m: Minutes
|
||||
* Right section: MM9c
|
||||
* M: Month
|
||||
* M: Day of month
|
||||
* w: Day of week
|
||||
* c: Calculated EAN-8 digit checksum
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var startOffsetX = 18;
|
||||
var startOffsetX = 17;
|
||||
var startOffsetHeight = 40;
|
||||
|
||||
var checkBarWidth = 10;
|
||||
|
@ -29,9 +29,10 @@ function renderWatch(l) {
|
|||
var d = new Date();
|
||||
var h = d.getHours(), m = d.getMinutes();
|
||||
var time = h + ":" + ("0"+m).substr(-2);
|
||||
var month = ("0" + (d.getMonth()+1)).slice(-2);
|
||||
//var month = ("0" + (d.getMonth()+1)).slice(-2);
|
||||
var dayOfMonth = ('0' + d.getDate()).slice(-2);
|
||||
var dayOfWeek = d.getDay() || 7;
|
||||
var concatTime = ("0"+h).substr(-2) + ("0"+m).substr(-2) + month + dayOfWeek;
|
||||
var concatTime = ("0"+h).substr(-2) + ("0"+m).substr(-2) + dayOfMonth + dayOfWeek;
|
||||
|
||||
const chars = String(concatTime).split("").map((concatTime) => {
|
||||
return Number(concatTime);
|
||||
|
@ -58,7 +59,6 @@ function renderWatch(l) {
|
|||
clearTimeout(drawTimeout);
|
||||
}
|
||||
drawTimeout = setTimeout(function() {
|
||||
|
||||
drawTimeout = undefined;
|
||||
layout.render(layout.watch);
|
||||
}, 60000 - (Date.now() % 60000));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Barcode clock",
|
||||
"shortName":"Barcode clock",
|
||||
"icon": "barcode.icon.png",
|
||||
"version":"0.04",
|
||||
"version":"0.05",
|
||||
"description": "EAN-8 compatible barcode clock.",
|
||||
"tags": "barcode,ean,ean-8,watchface,clock,clockface",
|
||||
"type": "clock",
|
||||
|
|
Loading…
Reference in New Issue