Skip to content

Commit

Permalink
Merge pull request #397 from dehilsterlexis/LOCALIZE_PREV_WEEKS
Browse files Browse the repository at this point in the history
fix: Localize previous week strings
  • Loading branch information
GordonSmith authored Apr 9, 2024
2 parents fbab724 + 9af4232 commit 826c64c
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 826c64c

Please sign in to comment.