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