From 5978717656475d76a45209a4d35ed6ba5cefff63 Mon Sep 17 00:00:00 2001 From: kevinxft Date: Fri, 9 Aug 2024 22:32:23 +0800 Subject: [PATCH] fix date sort --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 071e509..6015a54 100644 --- a/index.ts +++ b/index.ts @@ -67,7 +67,7 @@ type Data = { function generateAsciiTable(data: Data) { // 将数据按日期排序 const sortedDates = Object.keys(data).sort( - (a, b) => new Date(a).getTime() - new Date(b).getTime() + (a, b) => new Date(b).getTime() - new Date(a).getTime() ); // 生成表格