This commit is contained in:
xd
2025-06-05 22:47:41 +08:00
parent ed99c7b1ae
commit 6805b590c7
17 changed files with 144 additions and 56 deletions

View File

@ -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();