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

IntlFormatDistanceOptions

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

The intlFormatDistance function options.

interface IntlFormatDistanceOptions {
locale?: Intl.UnicodeBCP47LocaleIdentifier | Intl.UnicodeBCP47LocaleIdentifier[];
localeMatcher?: Intl.RelativeTimeFormatLocaleMatcher;
numeric?: Intl.RelativeTimeFormatNumeric;
style?: Intl.RelativeTimeFormatStyle;
}

§Properties

§
locale?: Intl.UnicodeBCP47LocaleIdentifier | Intl.UnicodeBCP47LocaleIdentifier[]
[src]
§
localeMatcher?: Intl.RelativeTimeFormatLocaleMatcher
[src]

The locale matching algorithm to use. Other value: 'lookup'. See MDN for details Locale identification and negotiation

§
numeric?: Intl.RelativeTimeFormatNumeric
[src]

The output message format. The values are 'auto' (e.g. yesterday), 'always'(e.g. 1 day ago)

§
style?: Intl.RelativeTimeFormatStyle
[src]

The length of the result. The values are: 'long' (e.g. 1 month), 'short' (e.g. 'in 1 mo.'), 'narrow' (e.g. 'in 1 mo.'). The narrow one could be similar to the short one for some locales.

§

Force the distance unit