Fix reading session timeline long sessions bug, tooltip perf, and ISO week mismatch (#2848)

This commit is contained in:
ACX
2026-02-22 12:46:33 -07:00
committed by GitHub
parent 4d0f529b76
commit d2e6722f98
4 changed files with 34 additions and 8 deletions
@@ -126,7 +126,7 @@ public class ReadingSessionService {
Long userId = authenticatedUser.getId();
LocalDate date = LocalDate.of(year, 1, 1)
.with(WeekFields.of(DayOfWeek.MONDAY, 1).weekOfYear(), week);
.with(WeekFields.ISO.weekOfYear(), week);
LocalDateTime startOfWeek = date.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).atStartOfDay();
LocalDateTime endOfWeek = date.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)).plusDays(1).atStartOfDay();