Skip to content

Commit 85dfb2c

Browse files
committed
feat(auth): show token expiry in days/weeks instead of raw hours
formatDuration() now supports 4 tiers: minutes, hours+minutes, days+hours, and weeks+days. Previously it maxed out at hours, producing awkward output like "580 hours and 16 minutes remaining" for tokens that expire in ~24 days. Extracted pluralUnit() and durationPair() helpers to keep the function under Biome complexity limit of 15.
1 parent 0748020 commit 85dfb2c

3 files changed

Lines changed: 133 additions & 61 deletions

File tree

0 commit comments

Comments
 (0)