From 109c64b140c36acd3dfec471e528921f0099ff47 Mon Sep 17 00:00:00 2001 From: oat9002 Date: Sun, 8 Mar 2026 12:45:22 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20update=20date=20formatting=20in=20G?= =?UTF-8?q?raph=20and=20Table=20components=20for=20better=20readability?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/Graph.tsx | 8 ++++---- web/src/Table.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/Graph.tsx b/web/src/Graph.tsx index 17706c8..5932e32 100755 --- a/web/src/Graph.tsx +++ b/web/src/Graph.tsx @@ -52,15 +52,15 @@ function Graph() { const d = dayjs.tz(createdAt); if (numOfDay >= 365) { - return d.format("YYYY/MM"); + return d.format("M/YY"); } if (numOfDay >= 60) { - return d.startOf("week").format("YYYY/MM/DD"); + return d.startOf("week").format("D/M/YY"); } if (numOfDay >= 30) { - return d.format("YYYY/MM/DD"); + return d.format("D/M/YY"); } - return d.format("YYYY/MM/DD HH:mm"); + return d.format("D/M/YY HH:mm"); } function getGraphData(rawData: Price[]): GraphData[] { diff --git a/web/src/Table.tsx b/web/src/Table.tsx index 90ae996..4cbe975 100755 --- a/web/src/Table.tsx +++ b/web/src/Table.tsx @@ -54,7 +54,7 @@ function GoldTable() { return goldPrices.map((x) => { return { - date: dayjs.tz(x.createdAt).format("YYYY-MM-DD HH:mm"), + date: dayjs.tz(x.createdAt).format("ddd, DD MMM YYYY HH:mm"), buy: formatNumber(x.buy), sell: formatNumber(x.sell), };