diff --git a/src/lib/components/util/RelativeDate.svelte b/src/lib/components/util/RelativeDate.svelte index 645c951d..d725b087 100644 --- a/src/lib/components/util/RelativeDate.svelte +++ b/src/lib/components/util/RelativeDate.svelte @@ -26,9 +26,17 @@ let language = locale ?? 'en' - const rtf = new Intl.RelativeTimeFormat(language, options) - - return rtf.format(-value, thresholds[i].unit as 'second') + if (settings.absoluteDates) { + const rtf = new Intl.DateTimeFormat(language, { + ...options, + timeStyle: 'short', + dateStyle: 'short', + }) + return rtf.format(date) + } else { + const rtf = new Intl.RelativeTimeFormat(language, options) + return rtf.format(-value, thresholds[i].unit as 'second') + } } } return 'Now' @@ -40,6 +48,7 @@