wangzhibo
2023-10-31 9da39812105bfc387db3b3b7c4896983e03d247d
1
2
3
4
5
import dayjs from 'dayjs'
import { locale } from '~/i18n'
 
export const formatTimeFromNow = (time: number | string) =>
  dayjs(time).locale(locale()).fromNow()