trait RelativeTimeFormat extends scala.scalajs.js.Object with StObject

Annotations
@JSType() @native()
Source
RelativeTimeFormat.scala
Linear Supertypes
StObject, scala.scalajs.js.Object, Any, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RelativeTimeFormat
  2. StObject
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef → Any
  8. def format(value: Double, unit: RelativeTimeFormatUnit): scala.Predef.String

    Formats a value and a unit according to the locale and formatting options of the given [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.

    Formats a value and a unit according to the locale and formatting options of the given [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.

    While this method automatically provides the correct plural forms, the grammatical form is otherwise as neutral as possible. It is the caller's responsibility to handle cut-off logic such as deciding between displaying "in 7 days" or "in 1 week". This API does not support relative dates involving compound units. e.g "in 5 days and 4 hours".

    value

    - Numeric value to use in the internationalized relative time message

    unit

    - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. Possible values are: "year", "quarter", "month", "week", "day", "hour", "minute", "second". Plural forms are also permitted.

    Exceptions thrown

    `RangeError` if unit was given something other than unit possible values

  9. def formatToParts(value: Double, unit: RelativeTimeFormatUnit): scala.scalajs.js.Array[RelativeTimeFormatPart]

    A version of the format method which it returns an array of objects which represent "parts" of the object, separating the formatted number into its constituent parts and separating it from other surrounding text.

    A version of the format method which it returns an array of objects which represent "parts" of the object, separating the formatted number into its constituent parts and separating it from other surrounding text. These objects have two properties: type a NumberFormat formatToParts type, and value, which is the String which is the component of the output. If a "part" came from NumberFormat, it will have a unit property which indicates the unit being formatted; literals which are part of the larger frame will not have this property.

    value

    - Numeric value to use in the internationalized relative time message

    unit

    - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message. Possible values are: "year", "quarter", "month", "week", "day", "hour", "minute", "second". Plural forms are also permitted.

    Exceptions thrown

    `RangeError` if unit was given something other than unit possible values

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hasOwnProperty(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: scala.Boolean
    Definition Classes
    Any
  14. def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
    Definition Classes
    Object
  15. final def ne(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  19. def resolvedOptions(): ResolvedRelativeTimeFormatOptions

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

  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toLocaleString(): scala.Predef.String
    Definition Classes
    Object
  22. def toString(): java.lang.String
    Definition Classes
    AnyRef → Any
  23. def valueOf(): Any
    Definition Classes
    Object
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from StObject

Inherited from scala.scalajs.js.Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped