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

FormatDistanceFn

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

The function that takes a token (i.e. halfAMinute) passed by formatDistance or formatDistanceStrict and payload, and returns localized distance.

type FormatDistanceFn = (
count: number,
) => string
;

§Type

§
(token: FormatDistanceToken, count: number, options?: FormatDistanceFnOptions) => string
[src]