use shorthand localized date format

This commit is contained in:
jeffvli
2026-01-04 01:58:15 -08:00
parent 3122c1a058
commit 9bbb213bc2
+3 -3
View File
@@ -87,12 +87,12 @@ updateDayjsLocale();
// Listen for i18n language changes
i18n.on('languageChanged', updateDayjsLocale);
export const formatDateAbsolute = (key: null | string) => (key ? dayjs(key).format('LL') : '');
export const formatDateAbsolute = (key: null | string) => (key ? dayjs(key).format('ll') : '');
export const formatDateAbsoluteUTC = (key: null | string) =>
key ? dayjs.utc(key).format('LL') : '';
key ? dayjs.utc(key).format('ll') : '';
export const formatHrDateTime = (key: null | string) => (key ? dayjs(key).format('LLL') : '');
export const formatHrDateTime = (key: null | string) => (key ? dayjs(key).format('lll') : '');
export const formatDateRelative = (key: null | string) => (key ? dayjs(key).fromNow() : '');