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
@@ -11,8 +11,10 @@
import Tooltip from '$lib/components/common/Tooltip.svelte';
import { error } from '@sveltejs/kit';
import EditMemoryModal from './EditMemoryModal.svelte';
import localizedFormat from 'dayjs/plugin/localizedFormat';
const i18n = getContext('i18n');
dayjs.extend(localizedFormat);
export let show = false;
@@ -84,9 +86,7 @@
</td>
<td class=" px-3 py-1 hidden md:flex h-[2.5rem]">
<div class="my-auto whitespace-nowrap">
{dayjs(memory.updated_at * 1000).format(
$i18n.t('MMMM DD, YYYY hh:mm:ss A')
)}
{dayjs(memory.updated_at * 1000).format('LLL')}
</div>
</td>
<td class="px-3 py-1">