Highlight weekend days in dashboard activity chart
Add isoDow() helper to datetime.js and mark weekend columns in the 14-day activity chart on the dashboard (orange bar, muted day label).
This commit is contained in:
@@ -105,6 +105,12 @@ function nowYear() {
|
||||
try { return new Intl.DateTimeFormat('en-CA', { timeZone: DateTime.tz, year: 'numeric' }).format(new Date()); } catch { return String(new Date().getFullYear()); }
|
||||
}
|
||||
|
||||
function isoDow(iso) {
|
||||
const p = dtIsoMatch(iso);
|
||||
if (!p) return -1;
|
||||
return new Date(Date.UTC(Number(p.y), Number(p.m) - 1, Number(p.d))).getUTCDay();
|
||||
}
|
||||
|
||||
function isoAddDays(iso, n) {
|
||||
const p = dtIsoMatch(iso);
|
||||
if (!p) return '';
|
||||
|
||||
Reference in New Issue
Block a user