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

Function formatRelative

pkgs/core/src/locale/it/_lib/formatRelative/index.ts:70–83  ·  view source on GitHub ↗
(
  token,
  date,
  baseDate,
  options,
)

Source from the content-addressed store, hash-verified

68};
69
70export const formatRelative: FormatRelativeFn = (
71 token,
72 date,
73 baseDate,
74 options,
75) => {
76 const format = formatRelativeLocale[token];
77
78 if (typeof format === "function") {
79 return format(date, baseDate, options);
80 }
81
82 return format;
83};

Callers

nothing calls this directly

Calls 1

formatFunction · 0.50

Tested by

no test coverage detected