MCPcopy
hub / github.com/date-fns/date-fns / formatDistanceToNow

Function formatDistanceToNow

pkgs/core/src/formatDistanceToNow/index.ts:93–98  ·  view source on GitHub ↗
(
  date: DateArg<Date> & {},
  options?: FormatDistanceToNowOptions,
)

Source from the content-addressed store, hash-verified

91 * //=> 'pli ol 1 jaro'
92 */
93export function formatDistanceToNow(
94 date: DateArg<Date> & {},
95 options?: FormatDistanceToNowOptions,
96): string {
97 return formatDistance(date, constructNow(date), options);
98}

Callers 1

test.tsFile · 0.90

Calls 2

formatDistanceFunction · 0.90
constructNowFunction · 0.90

Tested by

no test coverage detected