Renamed to anmolitor/intl-proxy. It is published under that name, and new versions come out there.
Versions published as andreasewering/intl-proxy still install under that name. 4 versions of 5 come from the new location (see their notes).
Rerouted (renamed, verified). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/anmolitor/intl-proxy.
What we checked: The repo moved to github.com/anmolitor/intl-proxy. Rebuilt with git archive from commit 75f7d1468994 of https://github.com/anmolitor/intl-proxy (zip prefix andreasewering-intl-proxy-75f7d14/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 f1c260992e184ff332cd0761ce03b972f1be695e.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/andreasewering/intl-proxy/zipball/2.0.0/
CodeGen for Intl functions. The Intl API will be given access to by a Proxy Object injected into the Elm Runtime via Flags. This mechanism makes it possible to have synchronous communication with JS. In order to avoid a lot of methods on the JS side, we are using a eval-like mechanism: We pass the information which Sub API to call and with which arguments as a JSON string.
Convienience decoder for Intl Type. This makes it possible for me to change the internal representation without a breaking change.
The different plural rules. Depending on language, you might only have two of these like English (one, other) or all 6.
Convert a PluralRule to its String representation. This is written so it is compatible with the return values of the Intl API.
Parse a PluralRule from a String. This is written so it is compatible with the return values of the Intl API.
Cardinal: Semantics of amount, Ordinal: Semantics of ranking (think 1st, 2nd ...)
Options for the plural function.
Determine the CLDR plural category (see https://www.unicode.org/cldr/cldr-aux/charts/30/supplemental/language_plural_rules.html)
for a given Int and language.
The possible categories are: zero, one, two, few, many, and other.
When the category cannot be determined for whatever reason, this function will default to "other".
Determine the CLDR plural category (see https://www.unicode.org/cldr/cldr-aux/charts/30/supplemental/language_plural_rules.html)
for a given Float and language.
The possible categories are: zero, one, two, few, many, and other.
When the category cannot be determined for whatever reason, this function will default to "other".
Options for the formatInt and formatFloat functions.
args can consist of any object entries you want to pass to the NumberFormat constructor.
The following serves as a hint to what is actually valid and will not result in an error:
- currency: String, needs to be set if style is "currency". For example "EUR" is a valid currency.
- currencyDisplay: "name", "symbol" or "code", defaults to "symbol"
- maximumFractionDigits: Int
- maximumSignificantDigits: Int
- minimumFractionDigits: Int
- minimumIntegerDigits: Int
- minimumSignificantDigits: Int
- style : one of "decimal", "currency", "percent"
- useGrouping : Bool, True results in something like 123.456.789 while False will result in 123456789Format a Float with the given Options
Format an Int with the given Options
Options for the formatDate function.
args can consist of any object entries you want to pass to the DateTimeFormat constructor.
The following serves as a hint to what is actually valid and will not result in an error:
- timeZone: String, implementation specific. UTC is the default and works for all implementations. Stuff like Asia/Shanghai could work depending on browser.
- hour12: Bool, determines whether AM/PM or 24h format should be used.
- hourCycle: "h11", "h12", "h23" or "h24". Overrides the hour12 argument.
- weekday: "narrow", "short or "long"
- era: "narrow", "short or "long"
- year: "numeric" or "2-digit"
- month: "numeric", "2-digit", "narrow", "short or "long"
- day: "numeric" or "2-digit"
- hour: "numeric" or "2-digit"
- minute: "numeric" or "2-digit"
- second: "numeric" or "2-digit"
- timeZoneName: "short" or "long"Format a Posix Time with the given Options
Use only if you know what you are doing! Accesses the Intl object directly which can be more efficient if you only want to relay json strings instead of decoding and encoding dicts in Elm. Also provides access to APIs that are not wrapped in a more typesafe way by this package yet.
Use this type for the JS Proxy Object you received via a flag or a port from the accompanying JS package.