diff --git a/src/hooks/usePackageData.ts b/src/hooks/usePackageData.ts index 00f13d7..57669b6 100644 --- a/src/hooks/usePackageData.ts +++ b/src/hooks/usePackageData.ts @@ -47,7 +47,17 @@ const usePackageData = () => { const data: CountResponse = await response.json(); setStats(data.counts); const dt = new Date(data.lastUpdateTime); - setLastUpdated(dt.toLocaleString()); + const dateLocale = dt.toLocaleDateString(navigator.language, { + day: '2-digit', + month: '2-digit', + year: 'numeric', + }); + const timeLocale = dt.toLocaleTimeString(navigator.language, { + hour: '2-digit', + minute: '2-digit' + }); + + setLastUpdated(`${timeLocale} on ${dateLocale}`); } catch (error) { console.error('Failed to fetch stats:', error); } finally {