Fix day of the week bug
parent
a78babc7b4
commit
fa718d8746
|
|
@ -1 +1,2 @@
|
||||||
0.01: Create mario app
|
0.01: Create mario app
|
||||||
|
0.02: Fix day of the week and add padding
|
||||||
|
|
|
||||||
|
|
@ -282,13 +282,12 @@ function drawTime() {
|
||||||
function drawDate() {
|
function drawDate() {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
const day = locale.dow(date).substr(0, 3);
|
const day = locale.dow(date).substr(0, 3);
|
||||||
const dayNum = date.getDay();
|
const dayNum = ("0" + date.getDate()).substr(-2);
|
||||||
const month = locale.month(date).substr(0, 3);
|
const month = locale.month(date).substr(0, 3);
|
||||||
const year = date.getFullYear();
|
|
||||||
|
|
||||||
g.setFont("6x8");
|
g.setFont("6x8");
|
||||||
g.setColor(LIGHTEST);
|
g.setColor(LIGHTEST);
|
||||||
g.drawString(`${day}, ${dayNum} ${month}`, 14, 0, true);
|
g.drawString(`${day} ${dayNum} ${month}`, 10, 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
function redraw() {
|
function redraw() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue