diff --git a/apps.json b/apps.json index 4f29159cb..923ebfecd 100644 --- a/apps.json +++ b/apps.json @@ -511,7 +511,7 @@ { "id": "dclock", "name": "Dev Clock", "icon": "clock-dev.png", - "version":"0.08", + "version":"0.09", "description": "A Digital Clock including timestamp (tst), beats(@), days in current month (dm) and days since new moon (l)", "tags": "clock", "type":"clock", diff --git a/apps/dclock/ChangeLog b/apps/dclock/ChangeLog index 6582ec16e..edf7da4c2 100644 --- a/apps/dclock/ChangeLog +++ b/apps/dclock/ChangeLog @@ -5,4 +5,5 @@ 0.05: add beats (@) 0.06: tidy up 0.07: add days in current month (md) and days since new moon (l) -0.08: update icon \ No newline at end of file +0.08: update icon +0.09: Use localised month and day of the week from locale diff --git a/apps/dclock/clock-dev.js b/apps/dclock/clock-dev.js index 39f031fcc..d2c08726a 100644 --- a/apps/dclock/clock-dev.js +++ b/apps/dclock/clock-dev.js @@ -1,3 +1,4 @@ +var locale = require("locale"); /* jshint esversion: 6 */ const timeFontSize = 4; const dateFontSize = 3; @@ -83,7 +84,7 @@ function drawSimpleClock() { // draw Month name, Day of the week and beats var beats = Math.floor((((dutc[0] + 1) % 24) + dutc[1] / 60 + dutc[2] / 3600) * 1000 / 24); g.setFont(font, smallFontSize); - g.drawString(`m:${da[1]} d:${da[0]} @${beats}`, xyCenter, yposDayMonth, true); + g.drawString(`m:${locale.month(d,true)} d:${locale.dow(d,true)} @${beats}`, xyCenter, yposDayMonth, true); // draw gmt var gmt = da[5];