diff --git a/web/src/lib/components/user-settings-page/user-api-key-list.svelte b/web/src/lib/components/user-settings-page/user-api-key-list.svelte index 6aebab282ca..ccc1bdfe920 100644 --- a/web/src/lib/components/user-settings-page/user-api-key-list.svelte +++ b/web/src/lib/components/user-settings-page/user-api-key-list.svelte @@ -18,6 +18,7 @@ import { fade } from 'svelte/transition'; import { handleError } from '../../utils/handle-error'; import { notificationController, NotificationType } from '../shared-components/notification/notification'; + import { dateFormats } from '$lib/constants'; interface Props { keys: ApiKeyResponseDto[]; @@ -25,12 +26,6 @@ let { keys = $bindable() }: Props = $props(); - const format: Intl.DateTimeFormatOptions = { - month: 'short', - day: 'numeric', - year: 'numeric', - }; - async function refreshKeys() { keys = await getApiKeys(); } @@ -130,7 +125,7 @@ >
{$t('purchase_activated_time', { - values: { date: new Date($user.license?.activatedAt) }, + values: { + date: new Date($user.license?.activatedAt).toLocaleString($locale, dateFormats.settings), + }, })}
{/if} diff --git a/web/src/lib/constants.ts b/web/src/lib/constants.ts index 167c976eeb2..fdb18b39781 100644 --- a/web/src/lib/constants.ts +++ b/web/src/lib/constants.ts @@ -72,6 +72,11 @@ export const dateFormats = { day: 'numeric', year: 'numeric', }, + settings: