MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / updateWeekStats

Method updateWeekStats

src/views/StatsView.ts:500–512  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

498 }
499
500 private async updateWeekStats() {
501 if (!this.weekStatsEl) return;
502
503 const todayLocal = getTodayLocal();
504 const firstDaySetting = this.plugin.settings.calendarViewSettings.firstDay || 0;
505 const weekStartsOn = isDay(firstDaySetting) ? firstDaySetting : 0;
506 const weekStartOptions: { weekStartsOn: Day } = { weekStartsOn };
507 const weekStart = startOfWeek(todayLocal, weekStartOptions);
508 const weekEnd = endOfWeek(todayLocal, weekStartOptions);
509
510 const stats = await this.calculateStatsForRange(weekStart, weekEnd);
511 this.renderTimeRangeStats(this.weekStatsEl, stats);
512 }
513
514 private async updateMonthStats() {
515 if (!this.monthStatsEl) return;

Callers 1

refreshStatsMethod · 0.95

Calls 4

renderTimeRangeStatsMethod · 0.95
getTodayLocalFunction · 0.90
isDayFunction · 0.70

Tested by

no test coverage detected