wip
This commit is contained in:
@ -77,7 +77,7 @@ export const formatMoney = (cents: number) => {
|
||||
};
|
||||
export function formatTimestamp(timestamp: string): string {
|
||||
// 创建 Date 对象
|
||||
const date = new Date(timestamp);
|
||||
const date = new Date(/^\d+$/.test(timestamp) ? Number(timestamp) : timestamp);
|
||||
|
||||
// 获取年、月、日、时、分、秒
|
||||
const YYYY = date.getFullYear();
|
||||
|
||||
Reference in New Issue
Block a user