From 32fd82dea40f399a94475dfce1964d76c73a0d84 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Mon, 26 Jun 2023 15:46:58 -0700 Subject: [PATCH] fix: format time --- helpers/time/dateFormat.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helpers/time/dateFormat.ts b/helpers/time/dateFormat.ts index 5c83b7aa6..43be484c7 100644 --- a/helpers/time/dateFormat.ts +++ b/helpers/time/dateFormat.ts @@ -1,5 +1,11 @@ import dayjs from 'dayjs'; +import localizedFormat from 'dayjs/plugin/localizedFormat'; -const formatDate = (date: string): string => dayjs(parseInt(date, 10)).format('llll'); +dayjs.extend(localizedFormat); + +const formatDate = (date: number): string => { + console.debug('[formatDate]', date, dayjs(date)); + return dayjs(date).format('llll'); +} export default formatDate;