1
0
Fork 0

Added day of week

master
Matrixes 2022-03-29 12:12:57 +02:00
parent a1162ef6d3
commit 91cab3aee4
4 changed files with 20 additions and 16 deletions

View File

@ -1,3 +1,4 @@
0.01: Please forgive me
0.02: Now tells time!
0.03: Interaction
0.04: Shows day of week

View File

@ -4,12 +4,14 @@ A scannable EAN-8 compatible face for your Bangle 2
The format of the bars are
`[HHmm] [MMwc]`
* Left section: HHmm
* H: Hours
* m: Minutes
* Right section: MM9c
* M: Month
* 9: constant
* w: Day of week
* c: Calculated EAN-8 digit checksum
This face is aware of theme choice, so it will adapt to Light/Dark themes.

View File

@ -30,7 +30,8 @@ function renderWatch(l) {
var h = d.getHours(), m = d.getMinutes();
var time = h + ":" + ("0"+m).substr(-2);
var month = ("0" + (d.getMonth()+1)).slice(-2);
var concatTime = ("0"+h).substr(-2) + ("0"+m).substr(-2) + month + 9;
var dayOfWeek = d.getDay() || 7;
var concatTime = ("0"+h).substr(-2) + ("0"+m).substr(-2) + month + dayOfWeek;
const chars = String(concatTime).split("").map((concatTime) => {
return Number(concatTime);

View File

@ -2,8 +2,8 @@
"name": "Barcode clock",
"shortName":"Barcode clock",
"icon": "barcode.icon.png",
"version":"0.03",
"description": "EAN-8 compatible barcode clock. Format (c: checksum): [HHmm] [MM9c]",
"version":"0.04",
"description": "EAN-8 compatible barcode clock.",
"tags": "barcode,ean,ean-8,watchface,clock,clockface",
"type": "clock",
"supports" : ["BANGLEJS2"],