Client - date formatting refactoring (WIP)

This commit is contained in:
Sam
2022-11-01 08:03:47 +01:00
parent 3777ac0a11
commit 6fce510a0a
9 changed files with 99 additions and 31 deletions

View File

@ -84,9 +84,10 @@
{{ $t('workouts.DATE') }}
</span>
{{
format(
getDateWithTZ(workout.workout_date, user.timezone),
`${user.date_format} HH:mm`
formatDate(
workout.workout_date,
user.timezone,
user.date_format
)
}}
</td>
@ -162,7 +163,6 @@
</template>
<script setup lang="ts">
import { format } from 'date-fns'
import {
ComputedRef,
Ref,
@ -186,7 +186,7 @@
import { IWorkout, TWorkoutsPayload } from '@/types/workouts'
import { useStore } from '@/use/useStore'
import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'
import { getDateWithTZ } from '@/utils/dates'
import { formatDate } from '@/utils/dates'
import { getSportColor, getSportLabel } from '@/utils/sports'
import { convertDistance } from '@/utils/units'
import { defaultOrder } from '@/utils/workouts'