GO-V.ORG
As seen in

Search e01

One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.

6 results across 6 corpora for Intl.RelativeTimeFormat.prototype.format().

Developer library 6

Firefox 70 release notes for developers

separators](/docs/Web/JavaScript/Reference/Lexical_grammar#numeric_separators) are now supported ([Firefox bug 1435818](https://bugzil.la/1435818)). - The Intl.RelativeTimeFormat.formatToParts() method has been implemented ([Firefox bug 1473229](https://bugzil.la/1473229)). - The BigInt.prototype.toLocaleString() method has been updated to work with the `locales` and `options` parameters per the ECMAScript 402 Intl A

Temporal

`"Temporal"`. This property is used in Object.prototype.toString(). ## Specifications ## Browser compatibility ## See also - Intl.DateTimeFormat - Intl.RelativeTimeFormat - Intl.DurationFormat - [Temporal polyfill by proposal champions](https://www.npmjs.com/package/@js-temporal/polyfill) - [Temporal polyfill by FullCalendar](https://www.npmjs.com/package/temporal-polyfill)

Intl

ive number formatting. - Intl.PluralRules - : Constructor for objects that enable plural-sensitive formatting and language-specific rules for plurals. - Intl.RelativeTimeFormat - : Constructor for objects that enable language-sensitive relative time formatting. - Intl.Segmenter - : Constructor for objects that enable locale-sensitive text segmentation. - `Intl[Symbol.toStringTag]` - : The initial value of the

Intl.RelativeTimeFormat

The **`Intl.RelativeTimeFormat`** object enables language-sensitive relative time formatting. JavaScript Demo: Intl.RelativeTimeFormat ```js interactive-example const rtf1 = new Intl.RelativeTimeFormat("en", { style: "short" }); console.log(rtf1.format(3, "quarter")); // Expected output: "in 3 qtrs." console.log(rtf1.format(-1, "day")); // Expected output: "1 day ago" const rtf2 = new Intl.RelativeTimeFormat("es

Intl.RelativeTimeFormat.prototype.formatToParts()

The **`formatToParts()`** method of Intl.RelativeTimeFormat instances returns an array of objects representing each part of the formatted string that would be returned by format(). It is useful for building custom strings from the locale-specific tokens. JavaScript Demo: Intl.RelativeTimeFormat.prototype.formatToParts() ```js interactive-example const rtf = new Intl.RelativeTimeFormat("en", { numeric: "auto" }); co

Intl.RelativeTimeFormat.prototype.format()

The **`format()`** method of Intl.RelativeTimeFormat instances formats a `value` and `unit` according to the locale and formatting options of this `Intl.RelativeTimeFormat` object. JavaScript Demo: Intl.RelativeTimeFormat.prototype.format() ```js interactive-example const rtf = new Intl.RelativeTimeFormat("en", { style: "short" }); console.log(rtf.format(3, "quarter")); // Expected output: "in 3 qtrs." console.lo

JSON results · Services directory