From 10ff00c9aabdd0803d8ae26db8971641d6270597 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Sun, 12 Apr 2026 16:15:34 +0200 Subject: [PATCH] chore: change date format --- src/pages/PluginDetail.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/PluginDetail.tsx b/src/pages/PluginDetail.tsx index 3f0b440..54b12b4 100644 --- a/src/pages/PluginDetail.tsx +++ b/src/pages/PluginDetail.tsx @@ -69,6 +69,14 @@ const getInitials = (username: string) => { return username.slice(0, 2).toUpperCase(); }; +const formatDate = (dateStr: string) => { + const d = new Date(dateStr); + const day = d.getDate(); + const month = d.toLocaleString('en-US', { month: 'short' }); + const year = d.getFullYear(); + return `${day} ${month}, ${year}`; +}; + const PluginDetail = () => { const { id } = useParams(); const { user } = useAuth(); @@ -680,7 +688,7 @@ const PluginDetail = () => {
{plugin.downloads.toLocaleString()} Downloads
{plugin.created_at && ( -
Released: {new Date(plugin.created_at).toLocaleDateString()}
+
Released: {formatDate(plugin.created_at)}
)}
Category: {plugin.category}
{plugin.version && (