use Intl.DateTimeFormat and Intl.NumberFormat instead of toLocaleString (#9444)

This commit is contained in:
tamaina
2023-01-01 17:11:33 +09:00
committed by GitHub
parent 0222165bd9
commit c3a36698e5
14 changed files with 42 additions and 18 deletions

View File

@@ -41,7 +41,7 @@
</div>
<MkPagination v-slot="{items}" ref="paginationComponent" :pagination="pagination" class="users">
<MkA v-for="user in items" :key="user.id" v-tooltip.mfm="`Last posted: ${new Date(user.updatedAt).toLocaleString()}`" class="user" :to="`/user-info/${user.id}`">
<MkA v-for="user in items" :key="user.id" v-tooltip.mfm="`Last posted: ${dateString(user.updatedAt)}`" class="user" :to="`/user-info/${user.id}`">
<MkUserCardMini :user="user"/>
</MkA>
</MkPagination>
@@ -63,6 +63,7 @@ import { lookupUser } from '@/scripts/lookup-user';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
import MkUserCardMini from '@/components/MkUserCardMini.vue';
import { dateString } from '@/filters/date';
let paginationComponent = $ref<InstanceType<typeof MkPagination>>();