Commented out date code for debugging purpose.

master
Stefan Kuehnel 2020-05-24 14:11:42 +02:00
parent bcea5326a5
commit ee6171e1ca
2 changed files with 5 additions and 6 deletions

View File

@ -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",

View File

@ -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);
}
*/
rowlights[0] = Math.floor(now.getHours() / 5);
rowlights[1] = now.getHours() % 5;
rowlights[2] = Math.floor(now.getMinutes() / 5);