MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / formatDistance

Function formatDistance

packages/utilities/src/date.ts:39–41  ·  view source on GitHub ↗
(date: string)

Source from the content-addressed store, hash-verified

37}
38
39export function formatDistance(date: string): string {
40 return utilFormatDistance(new Date(), new Date(date));
41}
42
43export function timeAgo(date: string | number) {
44 return formatDistanceToNow(typeof date === 'number' ? date : new Date(date), {

Callers 1

findWithStatsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected