hunshcn
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
4 deletions
-
src/utils/dateUtil.ts
|
|
|
@ -13,10 +13,8 @@ export function formatToDateTime( |
|
|
|
return dayjs(date).format(format); |
|
|
|
} |
|
|
|
|
|
|
|
export function formatToDate( |
|
|
|
date: dayjs.Dayjs | undefined = undefined, |
|
|
|
format = DATE_FORMAT, |
|
|
|
): string { |
|
|
|
export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): string { |
|
|
|
if (typeof date === 'number') date *= 1000; |
|
|
|
return dayjs(date).format(format); |
|
|
|
} |
|
|
|
|
|
|
|
|