mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-27 22:54:03 +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()
|