Skip to content

Commit

Permalink
fix: Localize previous week strings
Browse files Browse the repository at this point in the history
Signed-off-by: David de Hilster <[email protected]>
  • Loading branch information
dehilsterlexis committed Apr 8, 2024
1 parent fbab724 commit 9af4232
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ecl/eclWatchTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9af4232

Please sign in to comment.