feat: Localized dates and times

This commit is contained in:
Sharon Fox
2025-01-26 02:47:23 -05:00
parent 24ab79f5e9
commit dda945f4ad
11 changed files with 36 additions and 17 deletions
+3 -1
View File
@@ -16,8 +16,10 @@
import { getUserById } from '$lib/apis/users';
import { getModels } from '$lib/apis';
import { toast } from 'svelte-sonner';
import localizedFormat from 'dayjs/plugin/localizedFormat';
const i18n = getContext('i18n');
dayjs.extend(localizedFormat);
let loaded = false;
@@ -138,7 +140,7 @@
<div class="flex text-sm justify-between items-center mt-1">
<div class="text-gray-400">
{dayjs(chat.chat.timestamp).format($i18n.t('MMMM DD, YYYY'))}
{dayjs(chat.chat.timestamp).format('LLL')}
</div>
</div>
</div>