mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
6 lines
160 B
TypeScript
6 lines
160 B
TypeScript
import dayjs from 'dayjs'
|
|
import { locale } from '~/i18n'
|
|
|
|
export const formatTimeFromNow = (time: number | string) =>
|
|
dayjs(time).locale(locale()).fromNow()
|