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;
unit?: IntlFormatDistanceUnit;
}§Properties
§
locale?: Intl.UnicodeBCP47LocaleIdentifier | Intl.UnicodeBCP47LocaleIdentifier[]
[src]The locale(s) to use (see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument)
§
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.
§
unit?: IntlFormatDistanceUnit
[src]Force the distance unit