Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
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.
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"}.
Generated using TypeDoc
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.