Update app.js

Change new innings to use locale date
master
Andy Smy 2025-05-12 21:25:06 +01:00 committed by GitHub
parent e657802cf2
commit 3ba6e5ce99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -103,8 +103,7 @@ function showLog() {
draw : (idx, r) => { draw : (idx, r) => {
g.setBgColor((idx&1)?"#000":"#112").clearRect(r.x,r.y,r.x+r.w-1,r.y+r.h-1); g.setBgColor((idx&1)?"#000":"#112").clearRect(r.x,r.y,r.x+r.w-1,r.y+r.h-1);
if(log[idx].matchEvent==/*LANG*/"Over Duration" if(log[idx].matchEvent==/*LANG*/"Over Duration"
|| log[idx].matchEvent==/*LANG*/"Innings Duration" || log[idx].matchEvent==/*LANG*/"Innings Duration"){
|| log[idx].matchEvent==/*LANG*/"New Innings"){
g.setFont("Vector", 22).drawString( g.setFont("Vector", 22).drawString(
log[idx].matchEvent,r.x+6,r.y+2); log[idx].matchEvent,r.x+6,r.y+2);
} else { } else {
@ -387,7 +386,7 @@ function newInnings() {
} }
}); });
} else { } else {
addLog(timeSig, oversPerInnings + 1, ballsPerOver, "New Innings", timeSig); addLog(timeSig, oversPerInnings + 1, ballsPerOver, "New Innings", require("locale").date(new Date(), 1));
} }
} }