Commented out date code for debugging purpose.
parent
bcea5326a5
commit
ee6171e1ca
|
|
@ -887,7 +887,7 @@
|
||||||
{ "id": "berlinc",
|
{ "id": "berlinc",
|
||||||
"name": "Berlin Clock",
|
"name": "Berlin Clock",
|
||||||
"icon": "berlin-clock.png",
|
"icon": "berlin-clock.png",
|
||||||
"version":"0.03.03",
|
"version":"0.03.04",
|
||||||
"description": "Berlin Clock (see https://en.wikipedia.org/wiki/Mengenlehreuhr)",
|
"description": "Berlin Clock (see https://en.wikipedia.org/wiki/Mengenlehreuhr)",
|
||||||
"tags": "clock",
|
"tags": "clock",
|
||||||
"type":"clock",
|
"type":"clock",
|
||||||
|
|
|
||||||
|
|
@ -12,18 +12,17 @@ rowlights = [];
|
||||||
function drawBerlinClock() {
|
function drawBerlinClock() {
|
||||||
g.clear();
|
g.clear();
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
|
/*
|
||||||
if (show_date) {
|
if (show_date) {
|
||||||
var yr = now.getFullYear();
|
var yr = now.getFullYear();
|
||||||
var month = now.getMonth() + 1;
|
var month = now.getMonth() + 1;
|
||||||
var day = now.getDate();
|
var day = now.getDate();
|
||||||
//var dateString = `${yr}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
|
var dateString = `${yr}-${month < 10 ? '0' : ''}${month}-${day < 10 ? '0' : ''}${day}`;
|
||||||
var monthZero = month < 10 ? '0' : '';
|
|
||||||
var dayZero = day < 10 ? '0' : '';
|
|
||||||
var dateString = yr + "-" + monthZero + month + "-" + dayZero + day;
|
|
||||||
var strWidth = g.stringWidth(dateString);
|
var strWidth = g.stringWidth(dateString);
|
||||||
g.setColor(1, 1, 1);
|
g.setColor(1, 1, 1);
|
||||||
g.drawString(dateString, (g.getWidth() - strWidth) / 2, height + offset + 2);
|
g.drawString(dateString, ( g.getWidth() - strWidth ) / 2, height + offset + 2);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
rowlights[0] = Math.floor(now.getHours() / 5);
|
rowlights[0] = Math.floor(now.getHours() / 5);
|
||||||
rowlights[1] = now.getHours() % 5;
|
rowlights[1] = now.getHours() % 5;
|
||||||
rowlights[2] = Math.floor(now.getMinutes() / 5);
|
rowlights[2] = Math.floor(now.getMinutes() / 5);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue