mirror of
https://github.com/unraid/api.git
synced 2026-01-06 08:39:54 -06:00
fix: format time
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user