From 9af4232cf59f0776dba4bb0331930837cdff7825 Mon Sep 17 00:00:00 2001 From: David de Hilster Date: Mon, 8 Apr 2024 14:13:37 -0400 Subject: [PATCH] fix: Localize previous week strings Signed-off-by: David de Hilster --- src/ecl/eclWatchTree.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ecl/eclWatchTree.ts b/src/ecl/eclWatchTree.ts index 3c8eace..a27ba09 100644 --- a/src/ecl/eclWatchTree.ts +++ b/src/ecl/eclWatchTree.ts @@ -233,11 +233,11 @@ export class ECLWatchTree extends Tree { let idx = 0; currDate -= 6; curr = new Date(now.getFullYear(), now.getMonth(), currDate); - retVal.push(new ECLDateRangeNode(this, PrevWeeks[idx++], curr, new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() + 7))); + retVal.push(new ECLDateRangeNode(this, localize(PrevWeeks[idx++]), curr, new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() + 7))); while (curr.getMonth() === now.getMonth() && curr >= oldestWeek) { currDate -= 7; curr = new Date(now.getFullYear(), now.getMonth(), currDate); - retVal.push(new ECLDateRangeNode(this, PrevWeeks[idx++], curr, new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() + 7))); + retVal.push(new ECLDateRangeNode(this, localize(PrevWeeks[idx++]), curr, new Date(curr.getFullYear(), curr.getMonth(), curr.getDate() + 7))); } // Months