ai-tube / src /lib /formatTimeAgo.ts
jbilcke-hf's picture
jbilcke-hf HF staff
hide some features for the beta + improve player
f27679f
raw
history blame
163 Bytes
import { formatDistance } from 'date-fns'
export function formatTimeAgo(time: string) {
return formatDistance(new Date(time), new Date(), { addSuffix: true })
}