-
-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
Problem
The weekly-reset-timer and other usage duration widgets display total hours and minutes (e.g., 36hr 30m), even when the duration exceeds 24 hours. For weekly reset timers that can show up to ~168 hours, this is hard to parse at a glance.
Expected behavior
Durations >= 24h should include days, e.g.:
36hr 30m->1d 12hr 30m168hr->7d5hr 20m-> unchanged (below 24h)
Compact mode similarly: 36h30m -> 1d12h30m
Location
src/utils/usage-windows.ts, formatUsageDuration() (line 92-106)
Suggested fix
Add a days calculation before the hours/minutes logic:
const days = Math.floor(clampedMs / (1000 * 60 * 60 * 24));
const elapsedHours = Math.floor((clampedMs % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));Then prepend ${days}d when days > 0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels