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

Function formatRelative

pkgs/core/src/locale/sr/_lib/formatRelative/index.ts:38–51  ·  view source on GitHub ↗
(
  token,
  date,
  _baseDate,
  _options,
)

Source from the content-addressed store, hash-verified

36};
37
38export const formatRelative: FormatRelativeFn = (
39 token,
40 date,
41 _baseDate,
42 _options,
43) => {
44 const format = formatRelativeLocale[token];
45
46 if (typeof format === "function") {
47 return format(date);
48 }
49
50 return format;
51};

Callers

nothing calls this directly

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected