metacubexd/src/signals/global.ts

6 lines
160 B
TypeScript
Raw Normal View History

import dayjs from 'dayjs'
import { locale } from '~/i18n'
export const formatTimeFromNow = (time: number | string) =>
dayjs(time).locale(locale()).fromNow()