aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/components/FeedItem.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-07-13 16:17:39 +0900
committernsfisis <nsfisis@gmail.com>2025-07-13 16:17:44 +0900
commitda63ff8de9de86f01c232acd582e89e021bc1b01 (patch)
treea1f32d20adbb0b4accbb018d4a29253ab60e0276 /frontend/src/components/FeedItem.tsx
parent1b929f36ebecda48d4327b9598fce26151f04087 (diff)
downloadfeedaka-da63ff8de9de86f01c232acd582e89e021bc1b01.tar.gz
feedaka-da63ff8de9de86f01c232acd582e89e021bc1b01.tar.zst
feedaka-da63ff8de9de86f01c232acd582e89e021bc1b01.zip
feat(frontend): change datetime format
Diffstat (limited to 'frontend/src/components/FeedItem.tsx')
-rw-r--r--frontend/src/components/FeedItem.tsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/frontend/src/components/FeedItem.tsx b/frontend/src/components/FeedItem.tsx
index 020825a..29cd531 100644
--- a/frontend/src/components/FeedItem.tsx
+++ b/frontend/src/components/FeedItem.tsx
@@ -50,7 +50,7 @@ export function FeedItem({ feed, onFeedUnsubscribed }: Props) {
</p>
<div className="mt-2 flex items-center gap-4 text-sm">
<span className="text-gray-400">
- Last fetched: {new Date(feed.fetchedAt).toLocaleString()}
+ Last fetched: {formatDateTime(new Date(feed.fetchedAt))}
</span>
</div>
</div>
@@ -84,3 +84,13 @@ export function FeedItem({ feed, onFeedUnsubscribed }: Props) {
</div>
);
}
+
+function formatDateTime(date: Date): string {
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, "0");
+ const day = String(date.getDate()).padStart(2, "0");
+ const hours = String(date.getHours()).padStart(2, "0");
+ const minutes = String(date.getMinutes()).padStart(2, "0");
+
+ return `${year}-${month}-${day} ${hours}:${minutes}`;
+}