Skip to content

Commit acec747

Browse files
refactor: use locale instead of hardcoded language
1 parent b2968f4 commit acec747

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/components/Package/VersionDistribution.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,13 @@ const sanitise = (value: string) =>
107107
.replace(/[\\/:"*?<>|]/g, '-')
108108
.replace(/\//g, '-')
109109
110+
const { locale } = useI18n()
110111
function formatDate(date: Date) {
111-
return date.toLocaleString('en-US', { month: 'short', day: 'numeric', timeZone: 'UTC' })
112+
return date.toLocaleString(locale.value, {
113+
month: 'short',
114+
day: 'numeric',
115+
timeZone: 'UTC',
116+
})
112117
}
113118
114119
const endDate = computed(() => {

0 commit comments

Comments
 (0)