fix(utils): fix dateUtil.formatToDate ts type (#2345)
This commit is contained in:
parent
9ba15705b5
commit
384f929443
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue