diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-08 22:02:25 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-08 22:02:25 +0300 |
| commit | 04624b5a605132957d9810f97f721ace6eec12d9 (patch) | |
| tree | 7038673a93bf69a77d8aea7d5865a9a8292fa589 | |
| parent | 103f369cee209f6f0a15ef953cff138ffa025a26 (diff) | |
fix task 7 day calculation overflow
| -rw-r--r-- | internal/ui/helpers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/ui/helpers.go b/internal/ui/helpers.go index 8797ef9..b278def 100644 --- a/internal/ui/helpers.go +++ b/internal/ui/helpers.go @@ -30,7 +30,7 @@ func daysUntil(t time.Time) int { // Normalize both times to midnight UTC to avoid timezone and fractional day issues today := time.Date(now.Year(), now.Month(), now.Day(), 0, 0, 0, 0, time.UTC) target := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, time.UTC) - return int(target.Sub(today).Hours() / 24) + return int(target.Sub(today) / (24 * time.Hour)) } // formatDueText returns a human-readable due date string |
