mirror of https://github.com/espruino/BangleApps
Merge pull request #1262 from DDDanny/antonclk-clock-0.05-showWeeknumber
Antonclk clock 0.05 show weeknumber *bugfix*pull/1241/head^2
commit
da70a991b4
|
@ -40,7 +40,10 @@ The main menu contains several settings covering Anton clock in general.
|
|||
* **Show Weekday** - Weekday is shown in the time presentation without seconds.
|
||||
Weekday name depends on the current locale.
|
||||
If seconds are shown, the weekday is never shown as there is not enough space on the watch face.
|
||||
**Show Weeknumber** - Weeknumber (ISO-8601) is shown.
|
||||
* **Show Weeknumber** - Week-number (ISO-8601) is shown. (default: Off)
|
||||
If "Show Weekday" is "Off" the week-number is displayed as "week #:<num>".
|
||||
If "Show Weekday" is "On" the weekday name is cut at 6th position and suffixed with ".#<week num>".
|
||||
If seconds are shown, the week number is never shown as there is not enough space on the watch face.
|
||||
* **Vector font** - Use the built-in vector font for dates and weekday.
|
||||
This can improve readability.
|
||||
Otherwise, a scaled version of the built-in 6x8 pixels font is used.
|
||||
|
|
|
@ -188,9 +188,8 @@ function draw() {
|
|||
g.drawString(dateStr, x, y);
|
||||
if (weekDay || calWeek) {
|
||||
var dowwumStr = require("locale").dow(date);
|
||||
dowwumStr = "thursday";
|
||||
if (calWeek)
|
||||
dowwumStr = (weekDay ? dowwumStr.substr(0,Math.min(dowwumStr.length,6)) + (dowwumStr.length>=6 ? "." : "") : "week ") + "#" + ISO8601calWeek(date);
|
||||
dowwumStr = (weekDay ? dowwumStr.substr(0,Math.min(dowwumStr.length,6)) + (dowwumStr.length>=6 ? "." : "") : "week ") + "#" + ISO8601calWeek(date); //TODO: locale for "week"
|
||||
if (upperCase)
|
||||
dowwumStr = dowwumStr.toUpperCase();
|
||||
g.drawString(dowwumStr, x, y + (vectorFont ? 26 : 16));
|
||||
|
|
Loading…
Reference in New Issue