refactor: date format

This commit is contained in:
Zack Spear
2023-06-26 16:03:54 -07:00
committed by Zack Spear
parent 2cafeff93a
commit 08d60401a8
3 changed files with 58 additions and 8 deletions

View File

@@ -1,11 +1,9 @@
import dayjs from 'dayjs';
import localizedFormat from 'dayjs/plugin/localizedFormat';
/** @see https://day.js.org/docs/en/display/format#localized-formats */
dayjs.extend(localizedFormat);
const formatDate = (date: number): string => {
console.debug('[formatDate]', date, dayjs(date));
return dayjs(date).format('llll');
}
const formatDate = (date: number): string => dayjs(date).format('llll');
export default formatDate;