Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/components/DateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const props = withDefaults(
},
)

const { locale } = useI18n()

const relativeDates = useRelativeDates()

// Compute the title - always show full date for accessibility
Expand All @@ -41,7 +43,13 @@ const titleValue = computed(() => {

<template>
<ClientOnly>
<NuxtTime v-if="relativeDates" :datetime="datetime" :title="titleValue" relative />
<NuxtTime
v-if="relativeDates"
:datetime="datetime"
:title="titleValue"
relative
:locale="locale"
/>
<NuxtTime
v-else
:datetime="datetime"
Expand All @@ -50,6 +58,7 @@ const titleValue = computed(() => {
:year="year"
:month="month"
:day="day"
:locale="locale"
/>
<template #fallback>
<NuxtTime
Expand All @@ -59,6 +68,7 @@ const titleValue = computed(() => {
:year="year"
:month="month"
:day="day"
:locale="locale"
/>
</template>
</ClientOnly>
Expand Down