Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

FormatRelativeFn

import type { FormatRelativeFn } from "https://esm.sh/v135/date-fns@3.6.0/index.d.mts";

The locale function that does the work for the formatRelative function.

type FormatRelativeFn = <DateType extends Date>(
date: DateType,
baseDate: DateType,
) => string
;

§Type

§
<DateType extends Date>(token: FormatRelativeToken, date: DateType, baseDate: DateType, options?: FormatRelativeFnOptions) => string
[src]