RelativeTimeFormat

external class RelativeTimeFormat(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: RelativeTimeFormatOptions = definedExternally)(source)

Constructors

Link copied to clipboard
constructor(locales: Locale, options: RelativeTimeFormatOptions = definedExternally)
constructor(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: RelativeTimeFormatOptions = definedExternally)
constructor(locales: ReadonlyArray<Locale>, options: RelativeTimeFormatOptions = definedExternally)
constructor(locales: UnicodeBCP47LocaleIdentifier = definedExternally, options: RelativeTimeFormatOptions = definedExternally)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Formats a value and a unit according to the locale and formatting options of the given Intl.RelativeTimeFormat object.

Link copied to clipboard

Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.

Link copied to clipboard

Provides access to the locale and options computed during initialization of this Intl.RelativeTimeFormat object.