Merge pull request #2311 from eyecreate/patch-2
Add support for local time display to slopeclockppmaster
commit
172c73ed1c
|
|
@ -5,3 +5,4 @@
|
|||
Made fonts smaller to avoid overlap when (eg) 22:00
|
||||
Allowed black/white background (as that can look nice too)
|
||||
0.05: Images in clkinfo are optional now
|
||||
0.06: Added support for locale based time
|
||||
|
|
|
|||
|
|
@ -51,8 +51,9 @@ let draw = function() {
|
|||
x = R.w / 2;
|
||||
y = R.y + R.h / 2 - 12; // 12 = room for date
|
||||
var date = new Date();
|
||||
var hourStr = date.getHours();
|
||||
var minStr = date.getMinutes().toString().padStart(2,0);
|
||||
var local_time = require("locale").time(date, 1);
|
||||
var hourStr = local_time.split(":")[0].trim().padStart(2,'0');
|
||||
var minStr = local_time.split(":")[1].trim().padStart(2, '0');
|
||||
dateStr = require("locale").dow(date, 1).toUpperCase()+ " "+
|
||||
require("locale").date(date, 0).toUpperCase();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ "id": "slopeclockpp",
|
||||
"name": "Slope Clock ++",
|
||||
"version":"0.05",
|
||||
"version":"0.06",
|
||||
"description": "A clock where hours and minutes are divided by a sloping line. When the minute changes, the numbers slide off the screen. This is a clone of the original Slope Clock which shows extra information and allows the colors to be selected.",
|
||||
"icon": "app.png",
|
||||
"screenshots": [{"url":"screenshot.png"}],
|
||||
|
|
|
|||
Loading…
Reference in New Issue