From b49ea4e2620fd692cde02debc9e49c3a95e326d2 Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 14 Nov 2025 13:48:07 -0800 Subject: [PATCH] fix: allow future dates with RelativeDate.svelte --- src/lib/ui/util/RelativeDate.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ui/util/RelativeDate.svelte b/src/lib/ui/util/RelativeDate.svelte index 3ec071fb..4776cbd1 100644 --- a/src/lib/ui/util/RelativeDate.svelte +++ b/src/lib/ui/util/RelativeDate.svelte @@ -24,7 +24,7 @@ ] for (let i = thresholds.length - 1; i >= 0; i--) { - if (diffInMillis >= thresholds[i].threshold) { + if (Math.abs(diffInMillis) >= thresholds[i].threshold) { const value = Math.round(diffInMillis / thresholds[i].threshold) let language = locale ?? 'en'