Interface mozIMozIntlHelperType

This is an internal helper for mozIMozIntl API. There should be virtually no reason for you to call this API except from mozIMozIntl implementation.

This API helps accessing the SpiderMonkey Intl APIs, but it is mozIMozIntl that exposes the thin wrapper around them that binds the functionality to Gecko.

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Adds a MozDateTimeFormat contructor to the given object.

    The difference between regular Intl.DateTimeFormat and the method created here is that we support two more options:

    timeStyle: full | long | medium | short dateStyle: full | long | medium | short

    which allow user to create normalized date/time style formats. Additionally, when those options are used instead of the regular atomic options (hour, minute, month, etc.) this code will look into host Operating System regional preferences and adjust for that.

    That means that if user will manually select time format (hour12/24) or adjust how the date should be displayed, MozDateTimeFormat will use that.

    This API should be used everywhere in the UI instead of regular Intl API.

    Parameters

    • intlObject: any

    Returns void

  • Adds a MozDisplayNames contructor to the given object.

    The difference between regular Intl.DisplayNames and the method created here is that we additionally support the following values for the "type" option:

    weekday month quarter dayPeriod

    And we additionally support "abbreviated" for the "style" option.

    MozDisplayNames.prototype.of accepts the following inputs for these options:

    weekday: an integer in the range 1 = Monday to 7 = Sunday. month: an integer in the range 1 = January to 13 = Undecimber. quarter: an integer in the range 1 to 4. dayPeriod: a string from the set {"am", "pm"}.

    Parameters

    • intlObject: any

    Returns void

  • Parameters

    • intlObject: any

    Returns void

Generated using TypeDoc