diff --git a/.build b/.build index f23bda021..9bfe66119 100644 --- a/.build +++ b/.build @@ -210,9 +210,9 @@ api-reference.html assets/logo.png contributing.html dist/handlebars.runtime-NWIB6V2M.js -dist/handlebars.templates-XWGFFSCD.js -dist/html-JDI3AVDD.js -dist/html-elixir-HHVY3JYD.css +dist/handlebars.templates-NBND3S2D.js +dist/html-CGDDOCMI.js +dist/html-elixir-P5GXSCHE.css dist/inconsolata-latin-400-normal-RGKDDNDD.woff2 dist/inconsolata-latin-700-normal-DTS2D7TO.woff2 dist/inconsolata-latin-ext-400-normal-K7HVGTP7.woff2 @@ -236,8 +236,8 @@ dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 dist/remixicon-NKANDIL5.woff2 -dist/search_items-A1B8A707.js -dist/sidebar_items-CDCE2E48.js +dist/search_data-1A79964A.js +dist/sidebar_items-731A8722.js index.html readme.html search.html diff --git a/.ex_doc b/.ex_doc new file mode 100644 index 000000000..e69de29bb diff --git a/404.html b/404.html index c5f324cc9..aff359b21 100644 --- a/404.html +++ b/404.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.AnalyzePlans.html b/Mix.Tasks.AnalyzePlans.html index 7ed21d3eb..44d67059d 100644 --- a/Mix.Tasks.AnalyzePlans.html +++ b/Mix.Tasks.AnalyzePlans.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.CleanClickhouse.html b/Mix.Tasks.CleanClickhouse.html index 8f0c9f879..c81fda9a1 100644 --- a/Mix.Tasks.CleanClickhouse.html +++ b/Mix.Tasks.CleanClickhouse.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.CreateFreeSubscription.html b/Mix.Tasks.CreateFreeSubscription.html index 1c8aac0d4..3ab98d3f4 100644 --- a/Mix.Tasks.CreateFreeSubscription.html +++ b/Mix.Tasks.CreateFreeSubscription.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.DownloadCountryDatabase.html b/Mix.Tasks.DownloadCountryDatabase.html index 9bfe7143a..397a382a9 100644 --- a/Mix.Tasks.DownloadCountryDatabase.html +++ b/Mix.Tasks.DownloadCountryDatabase.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.GenerateReferrerFavicons.html b/Mix.Tasks.GenerateReferrerFavicons.html index 9d3e925a7..82df3d48d 100644 --- a/Mix.Tasks.GenerateReferrerFavicons.html +++ b/Mix.Tasks.GenerateReferrerFavicons.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.PullSandboxSubscription.html b/Mix.Tasks.PullSandboxSubscription.html index 5cee57726..9fda930ba 100644 --- a/Mix.Tasks.PullSandboxSubscription.html +++ b/Mix.Tasks.PullSandboxSubscription.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Mix.Tasks.SendPageview.html b/Mix.Tasks.SendPageview.html index adb74e20d..b5464833b 100644 --- a/Mix.Tasks.SendPageview.html +++ b/Mix.Tasks.SendPageview.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/ObanErrorReporter.html b/ObanErrorReporter.html index 3ce5a5d8c..1d7e1f3d4 100644 --- a/ObanErrorReporter.html +++ b/ObanErrorReporter.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.AsyncInsertRepo.html b/Plausible.AsyncInsertRepo.html index 015278a32..66a853e67 100644 --- a/Plausible.AsyncInsertRepo.html +++ b/Plausible.AsyncInsertRepo.html @@ -4,20 +4,20 @@ - +
See
- Similar to Example: Similar to Example:insert_all/2 but with the following differences:Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+insert_all/2 but with the following differences:
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
See Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.ApiKey.html b/Plausible.Auth.ApiKey.html index d5fa910b8..3a25ea440 100644 --- a/Plausible.Auth.ApiKey.html +++ b/Plausible.Auth.ApiKey.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.ApiKeyAdmin.html b/Plausible.Auth.ApiKeyAdmin.html index 2db9bf98d..272239bd2 100644 --- a/Plausible.Auth.ApiKeyAdmin.html +++ b/Plausible.Auth.ApiKeyAdmin.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.GracePeriod.html b/Plausible.Auth.GracePeriod.html index 5c3f49133..8680cbc01 100644 --- a/Plausible.Auth.GracePeriod.html +++ b/Plausible.Auth.GracePeriod.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.Invitation.html b/Plausible.Auth.Invitation.html index 6b72361c5..86eb3a248 100644 --- a/Plausible.Auth.Invitation.html +++ b/Plausible.Auth.Invitation.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.Password.html b/Plausible.Auth.Password.html index 8e0cae87d..f81c33a30 100644 --- a/Plausible.Auth.Password.html +++ b/Plausible.Auth.Password.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.Token.html b/Plausible.Auth.Token.html index 51af5b70d..a4344db7f 100644 --- a/Plausible.Auth.Token.html +++ b/Plausible.Auth.Token.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.User.html b/Plausible.Auth.User.html index dc368eba6..efbdd31eb 100644 --- a/Plausible.Auth.User.html +++ b/Plausible.Auth.User.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.UserAdmin.html b/Plausible.Auth.UserAdmin.html index 302062b42..6c3bac773 100644 --- a/Plausible.Auth.UserAdmin.html +++ b/Plausible.Auth.UserAdmin.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Auth.html b/Plausible.Auth.html index 1ba67fa23..24b493f71 100644 --- a/Plausible.Auth.html +++ b/Plausible.Auth.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.EnterprisePlan.html b/Plausible.Billing.EnterprisePlan.html index 111d46108..27c43a50e 100644 --- a/Plausible.Billing.EnterprisePlan.html +++ b/Plausible.Billing.EnterprisePlan.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.EnterprisePlanAdmin.html b/Plausible.Billing.EnterprisePlanAdmin.html index 231ebcd8c..fd38fd6c2 100644 --- a/Plausible.Billing.EnterprisePlanAdmin.html +++ b/Plausible.Billing.EnterprisePlanAdmin.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.PaddleApi.html b/Plausible.Billing.PaddleApi.html index e3e028f1a..96794eda7 100644 --- a/Plausible.Billing.PaddleApi.html +++ b/Plausible.Billing.PaddleApi.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.Plans.html b/Plausible.Billing.Plans.html index 1885b4e96..0cba3390f 100644 --- a/Plausible.Billing.Plans.html +++ b/Plausible.Billing.Plans.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.SiteLocker.html b/Plausible.Billing.SiteLocker.html index 8d6135c83..68abb7bf5 100644 --- a/Plausible.Billing.SiteLocker.html +++ b/Plausible.Billing.SiteLocker.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Billing.html b/Plausible.Billing.html index cfb61ac7b..921cd755e 100644 --- a/Plausible.Billing.html +++ b/Plausible.Billing.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.ChangesetHelpers.html b/Plausible.ChangesetHelpers.html index d4d9f771a..9574bd960 100644 --- a/Plausible.ChangesetHelpers.html +++ b/Plausible.ChangesetHelpers.html @@ -4,20 +4,20 @@ - +
Built using - ExDoc (v0.29.4) for the + ExDoc (v0.30.3) for the Elixir programming language diff --git a/Plausible.Cldr.AcceptLanguage.html b/Plausible.Cldr.AcceptLanguage.html index 8288decf5..1d5ce8f75 100644 --- a/Plausible.Cldr.AcceptLanguage.html +++ b/Plausible.Cldr.AcceptLanguage.html @@ -4,20 +4,20 @@ - +
Cldr.LanguageTag.The format of an Accept-Language header is as follows in ABNF format:
Accept-Language = "Accept-Language" ":"
1#( language-range [ ";" "q" "=" qvalue ] )
- language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )Each language-range MAY be given an associated quality value which represents an + language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) | "*" )
Each language-range MAY be given an associated quality value which represents an estimate of the user's preference for the languages specified by that range. The quality value defaults to "q=1". For example,
Accept-Language: da, en-gb;q=0.8, en;q=0.7would mean: "I prefer Danish, but will accept British English and other types of English."
- Link to this section
+ Summary
- Summary
@@ -183,9 +182,8 @@ in descending order.
- Link to this section
-
Functions
+
@@ -217,71 +215,71 @@ Functions
Parse an Accept-Language string and return the best match for
a configured Cldr locale.
-
- arguments
+
+
+ Arguments
- Arguments
accept_langauge is a string representing an accept language header
-
- returns
+
+
+ Returns
- Returns
{:ok, language_tag} or
{:error, reason}
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
+ transform: %{},
+ language_variants: []
+ }}
-iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.best_match("da;q=0.1,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
-
-iex> Plausible.Cldr.AcceptLanguage.best_match("xx,yy;q=0.3")
-{:error,
- {Cldr.NoMatchingLocale,
- "No configured locale could be matched to \"xx,yy;q=0.3\""}}
-
-iex> Plausible.Cldr.AcceptLanguage.best_match("invalid_tag")
-{:error, {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+ transform: %{},
+ language_variants: []
+ }}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("xx,yy;q=0.3")
+{:error,
+ {Cldr.NoMatchingLocale,
+ "No configured locale could be matched to \"xx,yy;q=0.3\""}}
+
+iex> Plausible.Cldr.AcceptLanguage.best_match("invalid_tag")
+{:error, {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
@@ -321,116 +319,116 @@ a configured Accept-Language header value in its string
or tokenized form to return a tuple of the form
{:ok, [{quality, %Cldr.LanguageTag{}}, ...]} sorted by quality.
-
- arguments
+
+
+ Arguments
- Arguments
accept-language is any string in the format defined by
rfc2616
backend is any module that includes use Cldr and therefore
is a Cldr backend module
-
- returns
+
+
+ Returns
- Returns
{:ok, [{quality, language_tag}, ...]} or
{:error, {Cldr.AcceptLanguageError, String.t}}
If at least one valid language tag is found but errors are also
detected on one more more tags, an {ok, list} tuple is returned
wuth an error tuple for each invalid tag added at the end of the list.
-
- example
+
+
+ Example
- Example
-iex> Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3", TestBackend.Cldr)
-{:ok,
- [
- {1.0,
- %Cldr.LanguageTag{
+iex> Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3", TestBackend.Cldr)
+{:ok,
+ [
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
- ]}
-
-iex> Plausible.Cldr.AcceptLanguage.parse("invalid_tag")
-{:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
-
-iex> Plausible.Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3,invalid_tag")
-{:ok,
- [
- {1.0,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }}
+ ]}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("invalid_tag")
+{:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+
+iex> Plausible.Cldr.AcceptLanguage.parse("da,zh-TW;q=0.3,invalid_tag")
+{:ok,
+ [
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }},
- {:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
- ]}
+ transform: %{},
+ language_variants: []
+ }},
+ {:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+ ]}
@@ -456,111 +454,111 @@ wuth an error tuple for each invalid tag added at the end of the list.[{quality, %Cldr.LanguageTag{}}, ...] sorted by quality
in descending order.
-
- arguments
+
+
+ Arguments
- Arguments
accept-language is any string in the format defined by rfc2616
-
- returns
+
+
+ Returns
- Returns
{:ok, [{quality, language_tag}, ...]} or
raises a Cldr.AcceptLanguageError exception
If at least one valid language tag is found but errors are also
detected on one more more tags, an {ok, list} tuple is returned
wuth an error tuple for each invalid tag added at the end of the list.
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3")
-[
- {1.0,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3")
+[
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }}
-]
+ transform: %{},
+ language_variants: []
+ }}
+]
Plausible.Cldr.AcceptLanguage.parse! "invalid_tag"
** (Cldr.AcceptLanguageError) "Expected a BCP47 language tag. Could not parse the remaining "g" starting at position 11
(ex_cldr) lib/cldr/accept_language.ex:304: Cldr.AcceptLanguage.parse!/1
-iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3,invalid_tag")
-[
- {1.0,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.AcceptLanguage.parse!("da,zh-TW;q=0.3,invalid_tag")
+[
+ {1.0,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "da",
cldr_locale_name: :da,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "da",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :da,
requested_locale_name: "da",
script: :Latn,
territory: :DK,
- transform: %{},
- language_variants: []
- }},
- {0.3,
- %Cldr.LanguageTag{
+ transform: %{},
+ language_variants: []
+ }},
+ {0.3,
+ %Cldr.LanguageTag{
backend: TestBackend.Cldr,
canonical_locale_name: "zh-TW",
cldr_locale_name: :"zh-Hant",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: nil,
language: "zh",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :"zh-Hant",
requested_locale_name: "zh-TW",
script: :Hant,
territory: :TW,
- transform: %{},
- language_variants: []
- }},
- {:error,
- {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
-]
+ transform: %{},
+ language_variants: []
+ }},
+ {:error,
+ {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"g\" starting at position 11"}}
+]
@@ -584,7 +582,7 @@ wuth an error tuple for each invalid tag added at the end of the list.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Currency.html b/Plausible.Cldr.Currency.html
index c5115cbdb..e1692b521 100644
--- a/Plausible.Cldr.Currency.html
+++ b/Plausible.Cldr.Currency.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Currency — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -324,9 +323,8 @@ in a given locale.
- Link to this section
-
Functions
+
@@ -370,33 +368,33 @@ Functions
Returns a map of the metadata for all currencies for
a given locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
currency_status is :all, :current, :historic,
unannotated or :tender; or a list of one or more status.
The default is :all. See Cldr.Currency.currency_filter/2.
-
- returns
+
+
+ Returns
- Returns
{:ok, currency_map} or
{:error, {exception, reason}}
-
- example
+
+
+ Example
- Example
MyApp.Cldr.Currency.currencies_for_locale "en"
=> {:ok,
- %{
FJD: %Cldr.Currency{
+ %{ FJD: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "FJD",
- count: %{one: "Fijian dollar", other: "Fijian dollars"},
+ count: %{one: "Fijian dollar", other: "Fijian dollars"},
digits: 2,
from: nil,
iso_digits: 2,
@@ -406,12 +404,12 @@ The default is :all. See symbol: "FJD",
tender: true,
to: nil
- },
- SUR: %Cldr.Currency{
+ },
+ SUR: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "SUR",
- count: %{one: "Soviet rouble", other: "Soviet roubles"},
+ count: %{one: "Soviet rouble", other: "Soviet roubles"},
digits: 2,
from: nil,
iso_digits: nil,
@@ -421,7 +419,7 @@ The default is :all. See symbol: "SUR",
tender: true,
to: nil
- },
+ },
...
}}
@@ -451,32 +449,32 @@ The default is :all. See
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
currency_status is :all, :current, :historic,
unannotated or :tender; or a list of one or more status.
The default is :all. See Cldr.Currency.currency_filter/2.
-
- returns
+
+
+ Returns
- Returns
{:ok, currency_map} or
raises an exception
-
- example
+
+
+ Example
- Example
MyApp.Cldr.Currency.currencies_for_locale! "en"
- => %{
FJD: %Cldr.Currency{
+ => %{FJD: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "FJD",
- count: %{one: "Fijian dollar", other: "Fijian dollars"},
+ count: %{one: "Fijian dollar", other: "Fijian dollars"},
digits: 2,
from: nil,
iso_digits: 2,
@@ -486,12 +484,12 @@ The default is :all. See symbol: "FJD",
tender: true,
to: nil
-},
-SUR: %Cldr.Currency{
+},
+SUR: %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "SUR",
- count: %{one: "Soviet rouble", other: "Soviet roubles"},
+ count: %{one: "Soviet rouble", other: "Soviet roubles"},
digits: 2,
from: nil,
iso_digits: nil,
@@ -501,7 +499,7 @@ The default is :all. See symbol: "SUR",
tender: true,
to: nil
-},
+},
...
}
@@ -534,38 +532,38 @@ The default is :all. See
-
- arguments
+
+
+ Arguments
- Arguments
currency_or_currency_code is a binary or atom representation
of an ISO 4217 currency code, or a %Cldr.Currency{} struct.
-
- options
+
+
+ Options
- Options
:locale is any valid locale name returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
-
- returns
+
+
+ Returns
- Returns
A {:ok, currency} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Currency.currency_for_code("AUD")
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code("AUD")
+{:ok,
+ %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "AUD",
- count: %{one: "Australian dollar", other: "Australian dollars"},
+ count: %{one: "Australian dollar", other: "Australian dollars"},
digits: 2,
iso_digits: 2,
name: "Australian Dollar",
@@ -573,15 +571,15 @@ or a rounding: 0,
symbol: "A$",
tender: true
-}}
+}}
-iex> Plausible.Cldr.Currency.currency_for_code("THB")
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code("THB")
+{:ok,
+ %Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "THB",
- count: %{one: "Thai baht", other: "Thai baht"},
+ count: %{one: "Thai baht", other: "Thai baht"},
digits: 2,
iso_digits: 2,
name: "Thai Baht",
@@ -589,7 +587,7 @@ or a rounding: 0,
symbol: "THB",
tender: true
-}}
+}}
@@ -623,37 +621,37 @@ or a
Returns the currency metadata for the requested currency code.
-
- arguments
+
+
+ Arguments
- Arguments
currency_or_currency_code is a binary or atom representation
of an ISO 4217 currency code, or a %Cldr.Currency{} struct.
-
- options
+
+
+ Options
- Options
:locale is any valid locale name returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
-
- returns
+
+
+ Returns
- Returns
A t:Cldr.Current.t/0 or
raises an exception
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Currency.currency_for_code!("AUD")
-%Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code!("AUD")
+%Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "AUD",
- count: %{one: "Australian dollar", other: "Australian dollars"},
+ count: %{one: "Australian dollar", other: "Australian dollars"},
digits: 2,
iso_digits: 2,
name: "Australian Dollar",
@@ -661,14 +659,14 @@ or a rounding: 0,
symbol: "A$",
tender: true
-}
+}
-iex> Plausible.Cldr.Currency.currency_for_code!("THB")
-%Cldr.Currency{
+iex> Plausible.Cldr.Currency.currency_for_code!("THB")
+%Cldr.Currency{
cash_digits: 2,
cash_rounding: 0,
code: "THB",
- count: %{one: "Thai baht", other: "Thai baht"},
+ count: %{one: "Thai baht", other: "Thai baht"},
digits: 2,
iso_digits: 2,
name: "Thai Baht",
@@ -676,7 +674,7 @@ or a rounding: 0,
symbol: "THB",
tender: true
-}
+}
@@ -699,29 +697,29 @@ or a
Returns the effective currency for a given locale
-
- arguments
+
+
+ Arguments
- Arguments
locale is a Cldr.LanguageTag struct returned by
Cldr.Locale.new!/2
-
- returns
+
+
+ Returns
- Returns
- A ISO 4217 currency code as an upcased atom
-
- examples
+
+
+ Examples
- Examples
-iex> {:ok, locale} = Plausible.Cldr.validate_locale "en"
+iex> {:ok, locale} = Plausible.Cldr.validate_locale "en"
iex> Plausible.Cldr.Currency.currency_from_locale locale
:USD
-iex> {:ok, locale} = Plausible.Cldr.validate_locale "en-AU"
+iex> {:ok, locale} = Plausible.Cldr.validate_locale "en-AU"
iex> Plausible.Cldr.Currency.currency_from_locale locale
:AUD
@@ -757,26 +755,26 @@ or a Returns a list of historic and the current
currency for a given locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
-
- example
+
+
+ Example
- Example
iex> MyApp.Cldr.Currency.currency_history_for_locale "en"
-{:ok,
- %{
- USD: %{from: ~D[1792-01-01], to: nil},
- USN: %{tender: false},
- USS: %{from: nil, tender: false, to: ~D[2014-03-01]}
- }
-}
+{:ok,
+ %{
+ USD: %{from: ~D[1792-01-01], to: nil},
+ USN: %{tender: false},
+ USS: %{from: nil, tender: false, to: ~D[2014-03-01]}
+ }
+}
@@ -815,29 +813,29 @@ or a Returns a map that matches a currency string to a
currency code.A currency string is a localised name or symbol
representing a currency in a locale-specific manner.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
currency_status is :all, :current, :historic,
unannotated or :tender; or a list of one or more status.
The default is :all. See Cldr.Currency.currency_filter/2.
-
- returns
+
+
+ Returns
- Returns
{:ok, currency_string_map} or
{:error, {exception, reason}}
-
- example
+
+
+ Example
- Example
MyApp.Cldr.Currency.currency_strings "en"
-=> {:ok,
- %{
+=> {:ok,
+ %{
"mexican silver pesos" => :MXP,
"sudanese dinar" => :SDD,
"bad" => :BAD,
@@ -847,7 +845,7 @@ The default is :all. See "guyanaese dollars" => :GYD,
"equatorial guinean ekwele" => :GQE,
...
- }}
+ }}
@@ -886,28 +884,28 @@ The default is :all. See
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
currency_status is :all, :current, :historic,
unannotated or :tender; or a list of one or more status.
The default is :all. See Cldr.Currency.currency_filter/2.
-
- returns
+
+
+ Returns
- Returns
{:ok, currency_string_map} or
raises an exception
-
- example
+
+
+ Example
- Example
MyApp.Cldr.Currency.currency_strings! "en"
-=> %{
+=> %{
"mexican silver pesos" => :MXP,
"sudanese dinar" => :SDD,
"bad" => :BAD,
@@ -917,7 +915,7 @@ The default is :all. See "guyanaese dollars" => :GYD,
"equatorial guinean ekwele" => :GQE,
...
- }
+ }
@@ -943,17 +941,17 @@ The default is :all. See cu or rg. It is recommended to us
Cldr.Currency.currency_from_locale/1 in most
circumstances.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
-
- example
+
+
+ Example
- Example
iex> MyApp.Cldr.Currency.current_currency_from_locale "en"
:USD
@@ -995,18 +993,18 @@ or a If a territory has no current currency (like
Antartica, territory code :AQ) then no
mapping is returned for that territory.
-
- returns
+
+
+ Returns
- Returns
- A map of
{territory_code => Cldr.Currency.t}
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.Currency.current_territory_currencies()
+iex> Plausible.Cldr.Currency.current_territory_currencies()
@@ -1080,29 +1078,29 @@ mapping is returned for that territory.
-
- arguments
+
+
+ Arguments
- Arguments
currency_code is a binary or atom representing an ISO4217
currency code
-
- returns
+
+
+ Returns
- Returns
{:ok, currency_code} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Currency.known_currency_code "AUD"
-{:ok, :AUD}
+{:ok, :AUD}
iex> Plausible.Cldr.Currency.known_currency_code "GGG"
-{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}
+{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}
@@ -1131,23 +1129,23 @@ currency code
-
- arguments
+
+
+ Arguments
- Arguments
currency_code is a binary or atom representing an ISO4217
currency code
-
- returns
+
+
+ Returns
- Returns
true or false
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Currency.known_currency_code? "AUD"
true
@@ -1185,10 +1183,10 @@ currency code
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Currency.known_currency_codes
@@ -1222,41 +1220,41 @@ currency codeCurrency struct created from the arguments.
-
- arguments
+
+
+ Arguments
- Arguments
currency is a private use currency code in a format defined by
ISO4217
which is X followed by two alphanumeric characters.
options is a map of options representing the optional elements of
the Cldr.Currency.t struct.
-
- options
+
+
+ Options
- Options
:name is the name of the currency. Required.:digits is the precision of the currency. Required.:symbol is the currency symbol. Optional.:narrow_symbol is an alternative narrow symbol. Optional.:round_nearest is the rounding precision such as 0.05. Optional.:alt_code is an alternative currency code for application use.:cash_digits is the precision of the currency when used as cash. Optional.:cash_rounding_nearest is the rounding precision when used as cash
such as 0.05. Optional.
-
- returns
+
+
+ Returns
- Returns
{:ok, Cldr.Currency.t} or
{:error, {exception, message}}
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.Currency.new(:XAE, name: "Custom Name", digits: 0)
-{:ok,
- %Cldr.Currency{
+iex> Plausible.Cldr.Currency.new(:XAE, name: "Custom Name", digits: 0)
+{:ok,
+ %Cldr.Currency{
alt_code: :XAE,
cash_digits: 0,
cash_rounding: nil,
code: :XAE,
- count: %{other: "Custom Name"},
+ count: %{other: "Custom Name"},
digits: 0,
from: nil,
iso_digits: 0,
@@ -1266,11 +1264,11 @@ such as 0.05. Optional.symbol
: "XAE",
tender: false,
to: nil
- }}
-iex> MyApp.Cldr.Currency.new(:XAH, name: "Custom Name")
-{:error, "Required options are missing. Required options are [:name, :digits]"}
-iex> Plausible.Cldr.Currency.new(:XAE, name: "XAE", digits: 0)
-{:error, {Cldr.CurrencyAlreadyDefined, "Currency :XAE is already defined."}}
+ }}
+iex> MyApp.Cldr.Currency.new(:XAH, name: "Custom Name")
+{:error, "Required options are missing. Required options are [:name, :digits]"}
+iex> Plausible.Cldr.Currency.new(:XAE, name: "XAE", digits: 0)
+{:error, {Cldr.CurrencyAlreadyDefined, "Currency :XAE is already defined."}}
@@ -1303,45 +1301,45 @@ such as 0.05. Optional.currency, based
on the plural rules in effect for the locale.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal
currency is any currency returned by Cldr.Currency.known_currencies/0
options is a keyword list of options
-
- options
+
+
+ Options
- Options
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1. The
default is Plausible.Cldr.get_locale/0
-
- returns
+
+
+ Returns
- Returns
{:ok, plural_string} or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Currency.pluralize 1, :USD
-{:ok, "US dollar"}
+{:ok, "US dollar"}
iex> Plausible.Cldr.Currency.pluralize 3, :USD
-{:ok, "US dollars"}
+{:ok, "US dollars"}
iex> Plausible.Cldr.Currency.pluralize 12, :USD, locale: "zh"
-{:ok, "美元"}
+{:ok, "美元"}
iex> Plausible.Cldr.Currency.pluralize 12, :USD, locale: "fr"
-{:ok, "dollars des États-Unis"}
+{:ok, "dollars des États-Unis"}
iex> Plausible.Cldr.Currency.pluralize 1, :USD, locale: "fr"
-{:ok, "dollar des États-Unis"}
+{:ok, "dollar des États-Unis"}
@@ -1365,26 +1363,26 @@ default is Plaus
Returns the strings associated with a currency
in a given locale.
-
- arguments
+
+
+ Arguments
- Arguments
currency is an ISO4217 currency code
locale is any valid locale name returned by MyApp.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by MyApp.Cldr.Locale.new!/1
-
- returns
+
+
+ Returns
- Returns
A list of strings or
{:error, {exception, reason}}
-
- example
+
+
+ Example
- Example
iex> MyApp.Cldr.Currency.strings_for_currency :AUD, "en"
-["a$", "australian dollars", "aud", "australian dollar"]
+["a$", "australian dollars", "aud", "australian dollar"]
@@ -1408,7 +1406,7 @@ or a
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Locale.html b/Plausible.Cldr.Locale.html
index 5f61841ea..bf99a49d1 100644
--- a/Plausible.Cldr.Locale.html
+++ b/Plausible.Cldr.Locale.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Locale — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -124,9 +124,8 @@ locale names for presentation purposes.
- Link to this section
+ Summary
- Summary
@@ -243,9 +242,8 @@ locale name.
- Link to this section
-
Functions
+
@@ -281,34 +279,34 @@ with the provided locale name.Fallbacks are a list of locate names which
be used to resolve translation or other localization
data if such localised data does not exist for
this specific locale..
-
- arguments
+
+
+ Arguments
- Arguments
locale_name is any locale name returned by
Plausible.Cldr.known_locale_names/0
-
- returns
+
+
+ Returns
- Returns
{:ok, list_of_locale_names} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Locale.fallback_locale_names(:"fr-CA")
-{:ok, [:"fr-CA", :fr, :und]}
+iex> Plausible.Cldr.Locale.fallback_locale_names(:"fr-CA")
+{:ok, [:"fr-CA", :fr, :und]}
# Fallbacks are typically formed by progressively
# stripping variant, territory and script from the
# given locale name. But not always - there are
# certain fallbacks that take a different path.
-iex> Plausible.Cldr.Locale.fallback_locale_names(:nb)
-{:ok, [:nb, :no, :und]}
+iex> Plausible.Cldr.Locale.fallback_locale_names(:nb)
+{:ok, [:nb, :no, :und]}
@@ -344,38 +342,38 @@ with the provided locale name.Fallbacks are a list of locate names which
be used to resolve translation or other localization
data if such localised data does not exist for
this specific locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale_name is any locale name returned by
Plausible.Cldr.known_locale_names/0
-
- returns
+
+
+ Returns
- Returns
{:ok, list_of_locales} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
-Plausible.Cldr.Locale.fallback_locales(:"fr-CA")
-=> {:ok,
- [#Cldr.LanguageTag<fr-CA [validated]>, #Cldr.LanguageTag<fr [validated]>,
- #Cldr.LanguageTag<und [validated]>]}
+Plausible.Cldr.Locale.fallback_locales(:"fr-CA")
+=> {:ok,
+ [#Cldr.LanguageTag<fr-CA [validated]>, #Cldr.LanguageTag<fr [validated]>,
+ #Cldr.LanguageTag<und [validated]>]}
# Fallbacks are typically formed by progressively
# stripping variant, territory and script from the
# given locale name. But not always - there are
# certain fallbacks that take a different path.
-Plausible.Cldr.Locale.fallback_locales(:nb))
-=> {:ok,
- [#Cldr.LanguageTag<nb [validated]>, #Cldr.LanguageTag<no [validated]>,
- #Cldr.LanguageTag<und [validated]>]}
+Plausible.Cldr.Locale.fallback_locales(:nb))
+=> {:ok,
+ [#Cldr.LanguageTag<nb [validated]>, #Cldr.LanguageTag<no [validated]>,
+ #Cldr.LanguageTag<und [validated]>]}
@@ -413,23 +411,23 @@ against the given backend.First a territory-specific locale is validated
that fails, the base language only is validate.
For example, if the territory is AU then then the
language most spoken is "en". First, the locale "en-AU"
is validated and if that fails, "en" is validated.
-
- arguments
+
+
+ Arguments
- Arguments
territory is any ISO 3166 Alpha-2 territory
code that can be validated by Cldr.validate_territory/1
-
- returns
+
+
+ Returns
- Returns
{:ok, language_tag} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Locale.locale_for_territory(:AU)
Elixir.Plausible.Cldr.validate_locale(:"en-AU")
iex> Plausible.Cldr.Locale.locale_for_territory(:US)
@@ -468,53 +466,53 @@ code that can be validated by
-
- arguments
+
+
+ Arguments
- Arguments
host is any valid host name
options is a keyword list of options. The default
is [].
-
- options
+
+
+ Options
- Options
:tlds is a list of territory codes as upper-cased
atoms that are to be considered as top-level domains.
See Cldr.Locale.locale_from_host/2 for the default
list.
-
- returns
+
+
+ Returns
- Returns
{:ok, langauge_tag} or
{:error, {exception, reason}}
-
- notes
+
+
+ Notes
- Notes
Certain top-level domains have become associated with content
underlated to the territory for who the domain is registered.
Therefore Google (and perhaps others) do not associate these
TLDs as belonging to the territory but rather are considered
generic top-level domain names.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Locale.locale_from_host "a.b.com.au"
-Elixir.Plausible.Cldr.validate_locale(:"en-AU")
+Elixir.Plausible.Cldr.validate_locale(:"en-AU")
-iex> Plausible.Cldr.Locale.locale_from_host("a.b.com.tv")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"tv\""}}
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com.tv")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"tv\""}}
-iex> Plausible.Cldr.Locale.locale_from_host("a.b.com")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+iex> Plausible.Cldr.Locale.locale_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
@@ -583,24 +581,24 @@ generic top-level domain names.
Returns the script direction for a locale.
-
- arguments
+
+
+ Arguments
- Arguments
language_tag is any language tag returned by Cldr.Locale.new/2
or any locale_name returned by Cldr.known_locale_names/1.
-
- returns
+
+
+ Returns
- Returns
- The script direction which is either
:ltr (for left-to-right
scripts) or :rtl (for right-to-left scripts).
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Locale.script_direction_from_locale "en-US"
:ltr
@@ -639,29 +637,29 @@ scripts) or :rtl (for right-to-left scripts).
Returns the last segment of a host that might
be a territory.
-
- arguments
+
+
+ Arguments
- Arguments
host is any valid host name
-
- returns
+
+
+ Returns
- Returns
{:ok, territory} or
{:error, {exception, reason}}
-
- examples
+
+
+ Examples
- Examples
-iex> Cldr.Locale.territory_from_host("a.b.com.au")
-{:ok, :AU}
+iex> Cldr.Locale.territory_from_host("a.b.com.au")
+{:ok, :AU}
-iex> Cldr.Locale.territory_from_host("a.b.com")
-{:error,
- {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
+iex> Cldr.Locale.territory_from_host("a.b.com")
+{:error,
+ {Cldr.UnknownLocaleError, "No locale was identified for territory \"com\""}}
@@ -694,25 +692,25 @@ be a territory.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any language tag returned by
Plausible.Cldr.Locale.new/1
or a locale name in the list returned by
Plausible.Cldr.known_locale_names/0
-
- returns
+
+
+ Returns
- Returns
- A territory code as an atom
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Locale.territory_from_locale "en-US"
:US
@@ -751,25 +749,25 @@ or a locale name in the list returned by
Returns the time zone from a language tag or
locale name.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any language tag returned by
Plausible.Cldr.Locale.new/1
or a locale name in the list returned by
Plausible.Cldr.known_locale_names/0
-
- returns
+
+
+ Returns
- Returns
A time zone ID as a string or
:error if no time zone can be determined
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Locale.timezone_from_locale "en-US-u-tz-ausyd"
"Australia/Sydney"
@@ -796,7 +794,7 @@ or a locale name in the list returned by
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Cardinal.html b/Plausible.Cldr.Number.Cardinal.html
index 41ccb4437..535a388a0 100644
--- a/Plausible.Cldr.Number.Cardinal.html
+++ b/Plausible.Cldr.Number.Cardinal.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Cardinal — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -201,9 +200,8 @@ and a substitution map.
- Link to this section
-
Functions
+
@@ -297,18 +295,18 @@ literally. For example, the key returned from
Cldr.Number.Ordinal.plural_rule(0, "en") is actually
:other, not :zero.This key can then be used to format a number, date, time, unit,
list or other content in a plural-sensitive way.
-
- arguments
+
+
+ Arguments
- Arguments
number is any integer, float or Decimal
locale is any locale returned by Cldr.Locale.new!/2 or any
locale_name returned by Plausible.Cldr.known_locale_names/0
rounding is one of [:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]. The
default is :half_even.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.Cardinal.plural_rule 0, "fr"
:one
@@ -374,10 +372,10 @@ default is :half_even.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any
locale_name returned by Plausible.Cldr.known_locale_names/0
The rules are returned in AST form after parsing.
@@ -414,45 +412,45 @@ default is :half_even.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal
locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any
locale_name returned by Plausible.Cldr.known_locale_names/0
substitutions is a map that maps plural keys to a string.
The valid substitution keys are :zero, :one, :two,
:few, :many and :other.
See also Plausible.Cldr.Number.Cardinal.Cardinal.plural_rule/3.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
nil
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
"few"
-iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
"other"
@@ -477,7 +475,7 @@ The valid substitution keys are :zero,
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Format.html b/Plausible.Cldr.Number.Format.html
index 8fbe150b8..a0b6c9456 100644
--- a/Plausible.Cldr.Number.Format.html
+++ b/Plausible.Cldr.Number.Format.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Format — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,10 +123,10 @@ number is too short, nothing goes there. A "¤" shows where the curren
will go. The following illustrates the effects of different patterns for the
French locale, with the number "1234.567". Notice how the pattern characters
',' and '.' are replaced by the characters appropriate for the locale.
-
- number-pattern-examples
+
+
+ Number Pattern Examples
- Number Pattern Examples
Pattern Currency Text #,##0.## n/a 1 234,57 #,##0.### n/a 1 234,567 ###0.##### n/a 1234,567 ###0.0000# n/a 1234,5670 00000.0000 n/a 01234,5670 #,##0.00 ¤ EUR 1 234,57 €
The number of # placeholder characters before the decimal do not matter,
since no limit is placed on the maximum number of digits. There should,
@@ -144,9 +144,8 @@ with the difference between Yen and Euro formatting.
Details of the number
- Link to this section
+ Summary
- Summary
@@ -274,9 +273,8 @@ or raises on error.
- Link to this section
-
Functions
+
@@ -308,20 +306,20 @@ Functions
Returns the decimal formats defined for a given locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
{:ok, map} where map is a map of decimal formats
keyed by number system or
{:error, {exception, message}}
@@ -356,20 +354,20 @@ keyed by number system or{:error, {exceptio
Returns the decimal formats defined for a given locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
{:ok, map} where map is a map of decimal formats
keyed by number system or
raises an exception
See Plausible.Cldr.Number.Format.Number.Format.all_formats_for/1 for further information.
@@ -435,13 +433,13 @@ number system.
Returns the list of decimal formats in the configured locales including
the list of locales configured for precompilation in config.exs.
This function exists to allow the decimal formatter
to precompile all the known formats at compile time.
-
- example
+
+
+ Example
- Example
#=> Plausible.Cldr.Number.Format.Format.decimal_format_list
-["#", "#,##,##0%",
+["#", "#,##,##0%",
"#,##,##0.###", "#,##,##0.00¤", "#,##,##0.00¤;(#,##,##0.00¤)",
"#,##,##0 %", "#,##0%", "#,##0.###", "#,##0.00 ¤",
"#,##0.00 ¤;(#,##0.00 ¤)", "#,##0.00¤", "#,##0.00¤;(#,##0.00¤)",
@@ -451,7 +449,7 @@ to precompile all the known formats at compile time."000 B ¤"
, "000 E ¤", "000 K ¤", "000 MRD ¤", "000 Md ¤", "000 Mio'.' ¤",
"000 Mio ¤", "000 Mld ¤", "000 Mln ¤", "000 Mn ¤", "000 Mrd'.' ¤",
"000 Mrd ¤", "000 Mr ¤", "000 M ¤", "000 NT ¤", "000 N ¤", "000 Tn ¤",
-"000 Tr ¤", ...]
+"000 Tr ¤", ...]
@@ -483,10 +481,10 @@ to precompile all the known formats at compile time.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
@@ -494,13 +492,13 @@ or a Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
This function exists to allow the decimal formatter to precompile all
the known formats at compile time. Its use is not otherwise recommended.
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.Number.Format.decimal_format_list_for(:en)
-{:ok, ["#,##0%", "#,##0.###", "#,##0.00", "#,##0.00;(#,##0.00)","#E0",
+iex> Plausible.Cldr.Number.Format.decimal_format_list_for(:en)
+{:ok, ["#,##0%", "#,##0.###", "#,##0.00", "#,##0.00;(#,##0.00)","#E0",
"0 billion", "0 million", "0 thousand",
"0 trillion", "00 billion", "00 million", "00 thousand", "00 trillion",
"000 billion", "000 million", "000 thousand", "000 trillion", "000B", "000K",
@@ -508,7 +506,7 @@ the known formats at compile time. Its use is not otherwise recommended."¤#,##0.00", "¤#,##0.00;(¤#,##0.00)", "¤000B", "¤000K", "¤000M",
"¤000T", "¤00B", "¤00K", "¤00M", "¤00T", "¤0B", "¤0K", "¤0M", "¤0T",
"¤ #,##0.00", "¤ #,##0.00;(¤ #,##0.00)", "¤ 000B", "¤ 000K", "¤ 000M",
- "¤ 000T", "¤ 00B", "¤ 00K", "¤ 00M", "¤ 00T", "¤ 0B", "¤ 0K", "¤ 0M", "¤ 0T"]}
+ "¤ 000T", "¤ 00B", "¤ 00K", "¤ 00M", "¤ 00T", "¤ 0B", "¤ 0K", "¤ 0M", "¤ 0T"]}
@@ -540,29 +538,29 @@ the known formats at compile time. Its use is not otherwise recommended.
Returns the default grouping for a locale as a map.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
{:ok, grouping} or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Format.default_grouping_for(:en)
-{:ok, %{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}}
+iex> Plausible.Cldr.Number.Format.default_grouping_for(:en)
+{:ok, %{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}}
@@ -593,29 +591,29 @@ is Plausible.Cld
Returns the default grouping for a locale
or raises on error.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
grouping as a map or
raises an exception
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Format.default_grouping_for!(:en)
-%{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}
+iex> Plausible.Cldr.Number.Format.default_grouping_for!(:en)
+%{fraction: %{first: 0, rest: 0}, integer: %{first: 3, rest: 3}}
@@ -649,10 +647,10 @@ is Plausible.Cld
Return the predfined formats for a given locale and number_system.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
@@ -660,10 +658,10 @@ or a Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
number_system is any valid number system or number system type returned
by Plausible.Cldr.Number.System.number_systems_for/1.
-
- example
+
+
+ Example
- Example
Plausible.Cldr.Number.Format.formats_for :fr, :native
#=> %Cldr.Number.Format{
@@ -672,18 +670,18 @@ by percent: "#,##0 %",
scientific: "#E0",
standard: "#,##0.###"
- currency_short: [{"1000", [one: "0 k ¤", other: "0 k ¤"]},
- {"10000", [one: "00 k ¤", other: "00 k ¤"]},
- {"100000", [one: "000 k ¤", other: "000 k ¤"]},
- {"1000000", [one: "0 M ¤", other: "0 M ¤"]},
- {"10000000", [one: "00 M ¤", other: "00 M ¤"]},
- {"100000000", [one: "000 M ¤", other: "000 M ¤"]},
- {"1000000000", [one: "0 Md ¤", other: "0 Md ¤"]},
- {"10000000000", [one: "00 Md ¤", other: "00 Md ¤"]},
- {"100000000000", [one: "000 Md ¤", other: "000 Md ¤"]},
- {"1000000000000", [one: "0 Bn ¤", other: "0 Bn ¤"]},
- {"10000000000000", [one: "00 Bn ¤", other: "00 Bn ¤"]},
- {"100000000000000", [one: "000 Bn ¤", other: "000 Bn ¤"]}],
+ currency_short: [{"1000", [one: "0 k ¤", other: "0 k ¤"]},
+ {"10000", [one: "00 k ¤", other: "00 k ¤"]},
+ {"100000", [one: "000 k ¤", other: "000 k ¤"]},
+ {"1000000", [one: "0 M ¤", other: "0 M ¤"]},
+ {"10000000", [one: "00 M ¤", other: "00 M ¤"]},
+ {"100000000", [one: "000 M ¤", other: "000 M ¤"]},
+ {"1000000000", [one: "0 Md ¤", other: "0 Md ¤"]},
+ {"10000000000", [one: "00 Md ¤", other: "00 Md ¤"]},
+ {"100000000000", [one: "000 Md ¤", other: "000 Md ¤"]},
+ {"1000000000000", [one: "0 Bn ¤", other: "0 Bn ¤"]},
+ {"10000000000000", [one: "00 Bn ¤", other: "00 Bn ¤"]},
+ {"100000000000000", [one: "000 Bn ¤", other: "000 Bn ¤"]}],
...
}
@@ -753,29 +751,29 @@ by
Returns the minimum grouping digits for a locale.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
{:ok, minumum_digits} or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for("en")
-{:ok, 1}
+iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for("en")
+{:ok, 1}
@@ -806,28 +804,28 @@ is Plausible.Cld
Returns the minimum grouping digits for a locale
or raises on error.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
minumum_digits or
raises an exception
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for!("en")
+iex> Plausible.Cldr.Number.Format.minimum_grouping_digits_for!("en")
1
@@ -852,7 +850,7 @@ is Plausible.Cld
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Formatter.Decimal.html b/Plausible.Cldr.Number.Formatter.Decimal.html
index d3e54ff14..1ef4c33ce 100644
--- a/Plausible.Cldr.Number.Formatter.Decimal.html
+++ b/Plausible.Cldr.Number.Formatter.Decimal.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Formatter.Decimal — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -154,9 +153,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -213,10 +211,10 @@ Functions
Formats a number according to a decimal format string.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal
format is a format string. See Plausible.Cldr.Number for further information.
options is a map of options. See Plausible.Cldr.Number.to_string/2
for further information.
@@ -243,7 +241,7 @@ for further information.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Ordinal.html b/Plausible.Cldr.Number.Ordinal.html
index bad31e85a..c559cf9ff 100644
--- a/Plausible.Cldr.Number.Ordinal.html
+++ b/Plausible.Cldr.Number.Ordinal.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Ordinal — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -201,9 +200,8 @@ and a substitution map.
- Link to this section
-
Functions
+
@@ -297,18 +295,18 @@ literally. For example, the key returned from
Cldr.Number.Ordinal.plural_rule(0, "en") is actually
:other, not :zero.This key can then be used to format a number, date, time, unit,
list or other content in a plural-sensitive way.
-
- arguments
+
+
+ Arguments
- Arguments
number is any integer, float or Decimal
locale is any locale returned by Cldr.Locale.new!/2 or any
locale_name returned by Plausible.Cldr.known_locale_names/0
rounding is one of [:down, :up, :ceiling, :floor, :half_even, :half_up, :half_down]. The
default is :half_even.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.Ordinal.plural_rule 0, "fr"
:other
@@ -374,10 +372,10 @@ default is :half_even.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any locale returned by Plausible.Cldr.Locale.new!/1 or any
locale_name returned by Plausible.Cldr.known_locale_names/0
The rules are returned in AST form after parsing.
@@ -414,10 +412,10 @@ default is :half_even.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal or a Range.t{}. When a range, The
is that in any usage, the start value is strictly less than the end value,
@@ -426,36 +424,36 @@ these criteria are undefined.
locale
locale_name returned by Plausible.Cldr.known_locale_names/0
substitutions is a map that maps plural keys to a string.
The valid substitution keys are :zero, :one, :two,
:few, :many and :other.
See also Plausible.Cldr.Number.Ordinal.Ordinal.plural_rule/3.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1, :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1, :en, %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 2, :en, %{one: "one", two: "two"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 22, :en, %{one: "one", two: "two", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 22, :en, %{one: "one", two: "two", other: "other"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(1), :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(1), :en, %{one: "one"}
"one"
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one"}
nil
-iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one", two: "two"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize Decimal.new(2), :en, %{one: "one", two: "two"}
"two"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
"other"
-iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
+iex> Plausible.Cldr.Number.Ordinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
"other"
@@ -480,7 +478,7 @@ The valid substitution keys are :zero,
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.PluralRule.Range.html b/Plausible.Cldr.Number.PluralRule.Range.html
index 921d8c320..ba0561f5e 100644
--- a/Plausible.Cldr.Number.PluralRule.Range.html
+++ b/Plausible.Cldr.Number.PluralRule.Range.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.PluralRule.Range — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -151,9 +150,8 @@ type, an end-of-range plural type and a locale.
- Link to this section
-
Functions
+
@@ -187,17 +185,17 @@ Functions
Returns a final plural type for a start-of-range plural
type, an end-of-range plural type and a locale.
-
- arguments
+
+
+ Arguments
- Arguments
first is a plural type for the start of a range
last is a plural type for the end of a range
locale is any Cldr.LanguageTag.t or a language name
(not locale name)
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.PluralRule.Range.plural_rule :other, :few, "ar"
:few
@@ -224,7 +222,7 @@ type, an end-of-range plural type and a locale.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Symbol.html b/Plausible.Cldr.Number.Symbol.html
index 01a99486f..0de0c1d63 100644
--- a/Plausible.Cldr.Number.Symbol.html
+++ b/Plausible.Cldr.Number.Symbol.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Symbol — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -203,9 +202,8 @@ of the number systems of a locale.
- Link to this section
-
Functions
+
@@ -336,24 +334,24 @@ when builing a regular expression.
Returns a map of Cldr.Number.Symbol.t structs of the number symbols for each
of the number systems of a locale.
-
- options
+
+
+ Options
- Options
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by
Plausible.Cldr.Locale.new!/1. The default
is Plausible.Cldr.get_locale/0.
-
- example
+
+
+ Example:
- Example:
-iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
-{:ok, %{
- latn: %Cldr.Number.Symbol{
+iex> Plausible.Cldr.Number.Symbol.number_symbols_for(:th)
+{:ok, %{
+ latn: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
@@ -366,8 +364,8 @@ is Plausible.Cld
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
- },
- thai: %Cldr.Number.Symbol{
+ },
+ thai: %Cldr.Number.Symbol{
decimal: ".",
exponential: "E",
group: ",",
@@ -380,8 +378,8 @@ is Plausible.Cld
plus_sign: "+",
superscripting_exponent: "×",
time_separator: ":"
- }
- }}
+ }
+ }}
@@ -427,7 +425,7 @@ is Plausible.Cld
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.System.html b/Plausible.Cldr.Number.System.html
index 4eaa2a7b1..99d814a53 100644
--- a/Plausible.Cldr.Number.System.html
+++ b/Plausible.Cldr.Number.System.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.System — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -244,9 +243,8 @@ string or raises on error.
- Link to this section
-
Functions
+
@@ -284,29 +282,29 @@ or a Cldr.known_number_system_types/0This function will decode a number system type into the actual
number system. If the number system provided can't be decoded
it is returned as is.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.number_system_for "th", :latn
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :default
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "he", :traditional
-{:ok, %{rules: "hebrew", type: :algorithmic}}
+{:ok, %{rules: "hebrew", type: :algorithmic}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :native
-{:ok, %{digits: "0123456789", type: :numeric}}
+{:ok, %{digits: "0123456789", type: :numeric}}
iex> Plausible.Cldr.Number.System.number_system_for "en", :finance
-{
+{
:error,
- {Cldr.UnknownNumberSystemError,
- "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"}
-}
+ {Cldr.UnknownNumberSystemError,
+ "The number system :finance is unknown for the locale named :en. Valid number systems are %{default: :latn, native: :latn}"}
+}
@@ -337,23 +335,23 @@ it is returned as is.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any language tag returned be Cldr.Locale.new/2
or a locale name in the list returned by Cldr.known_locale_names/1
-
- returns
+
+
+ Returns
- Returns
- A number system name as an atom
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.number_system_from_locale "en-US-u-nu-thai"
:thai
@@ -391,16 +389,16 @@ or a locale name in the list returned by {:error, message} if the locale is not known.
locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.number_system_names_for "en"
-{:ok, [:latn]}
+{:ok, [:latn]}
iex> Plausible.Cldr.Number.System.number_system_names_for "zz"
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
@@ -476,19 +474,19 @@ or a Returns the number systems available for a locale
or {:error, message} if the locale is not known.locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.number_systems_for "en"
-{:ok, %{default: :latn, native: :latn}}
+{:ok, %{default: :latn, native: :latn}}
iex> Plausible.Cldr.Number.System.number_systems_for "th"
-{:ok, %{default: :latn, native: :thai}}
+{:ok, %{default: :latn, native: :thai}}
iex> Plausible.Cldr.Number.System.number_systems_for "zz"
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
@@ -581,25 +579,25 @@ or a WIth the number system name directly, such as :latn, :arab or any of the
other 70 or so
This function dereferences the supplied system_name and returns the
actual system name.
-
- examples
+
+
+ Examples
- Examples
-ex> Plausible.Cldr.Number.System.system_name_from(:default, "en")
-{:ok, :latn}
+ex> Plausible.Cldr.Number.System.system_name_from(:default, "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from("latn", "en")
-{:ok, :latn}
+iex> Plausible.Cldr.Number.System.system_name_from("latn", "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from(:native, "en")
-{:ok, :latn}
+iex> Plausible.Cldr.Number.System.system_name_from(:native, "en")
+{:ok, :latn}
-iex> Plausible.Cldr.Number.System.system_name_from(:nope, "en")
-{
+iex> Plausible.Cldr.Number.System.system_name_from(:nope, "en")
+{
:error,
- {Cldr.UnknownNumberSystemError, "The number system :nope is unknown"}
-}
Note that return value is not guaranteed to be a valid
+
{Cldr.UnknownNumberSystemError, "The number system :nope is unknown"}
+}
Note that return value is not guaranteed to be a valid
number system for the given locale as demonstrated in the third example.
@@ -640,22 +638,22 @@ These rulesets are considered by CLDR to be
less rigorous than the :numeric number systems
and caution and testing for a specific use case
is recommended.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.to_system 123456, :hebr
-{:ok, "קכ״ג׳תנ״ו"}
+{:ok, "קכ״ג׳תנ״ו"}
iex> Plausible.Cldr.Number.System.to_system 123, :hans
-{:ok, "一百二十三"}
+{:ok, "一百二十三"}
iex> Plausible.Cldr.Number.System.to_system 123, :hant
-{:ok, "一百二十三"}
+{:ok, "一百二十三"}
iex> Plausible.Cldr.Number.System.to_system 123, :hansfin
-{:ok, "壹佰贰拾叁"}
+{:ok, "壹佰贰拾叁"}
@@ -683,10 +681,10 @@ string or raises on error.number is a
Plausible.Cldr.known_number_systems/0 or a number system type
returned by Plausible.Cldr.known_number_system_types/0
See Plausible.Cldr.Number.System.to_system/2 for further
information.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.System.to_system! 123, :hans
"一百二十三"
@@ -719,7 +717,7 @@ information.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.Transliterate.html b/Plausible.Cldr.Number.Transliterate.html
index f913d9936..70778e343 100644
--- a/Plausible.Cldr.Number.Transliterate.html
+++ b/Plausible.Cldr.Number.Transliterate.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number.Transliterate — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,22 +123,22 @@ formatting already. When short circuiting is possible (typically the en-*
locales with "latn" number_system - the total number of short circuited
locales is 211 of the 537 in CLDR) the overall number formatting is twice as
fast than when formal transliteration is required.
-
- configuring-precompilation-of-digit-transliterations
+
+
+ Configuring precompilation of digit transliterations
- Configuring precompilation of digit transliterations
This module includes Cldr.Number.Transliterate.transliterate_digits/3 which transliterates
digits between number systems. For example from :arabic to :latn. Since generating a
transliteration map is slow, pairs of transliterations can be configured so that the
transliteration map is created at compile time and therefore speeding up transliteration at
run time.
To configure these transliteration pairs, add the to the use Cldr configuration
-in a backend module:
defmodule MyApp.Cldr do
+in a backend module:defmodule MyApp.Cldr do
use Cldr,
- locale: ["en", "fr", "th"],
+ locale: ["en", "fr", "th"],
default_locale: "en",
- precompile_transliterations: [{:latn, :thai}, {:arab, :thai}]
-end
Where each tuple in the list configures one transliteration map. In this example, two maps are
+
precompile_transliterations: [{:latn, :thai}, {:arab, :thai}]
+end
Where each tuple in the list configures one transliteration map. In this example, two maps are
configured: from :latn to :thai and from :arab to :thai.
A list of configurable number systems is returned by Cldr.Number.System.systems_with_digits/0.
If a transliteration is requested between two number pairs that have not been configured for
precompilation, a warning is logged.
@@ -148,9 +148,8 @@ precompilation, a warning is logged.
- Link to this section
+ Summary
- Summary
@@ -194,9 +193,8 @@ precompilation, a warning is logged.
- Link to this section
-
Functions
+
@@ -236,10 +234,10 @@ Functions
another number system. Also transliterates the decimal and grouping
separators as well as the plus, minus and exponent symbols. Any other character
in the string will be returned "as is".
-
- arguments
+
+
+ Arguments
- Arguments
sequence is the string to be transliterated.
locale is any known locale, defaulting to Plausible.Cldr.get_locale/0.
number_system is any known number system. If expressed as a string it
is the actual name of a known number system. If epressed as an atom it is
@@ -249,27 +247,27 @@ standard). See
see what number system types are defined. The default is :default.
For available number systems see Cldr.Number.System.number_systems/0
and Plausible.Cldr.Number.System.number_systems_for/1. Also see
Plausible.Cldr.Number.Symbol.number_symbols_for/1.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556")
"123556"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123,556.000", "fr", :default)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123,556.000", "fr", :default)
"123 556,000"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :default)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :default)
"123556"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", "thai")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", "thai")
"๑๒๓๕๕๖"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :native)
+iex> Plausible.Cldr.Number.Transliterate.transliterate("123556", "th", :native)
"๑๒๓๕๕๖"
-iex> Plausible.Cldr.Number.Transliterate.transliterate("Some number is: 123556", "th", "thai")
+iex> Plausible.Cldr.Number.Transliterate.transliterate("Some number is: 123556", "th", "thai")
"Some number is: ๑๒๓๕๕๖"
@@ -326,10 +324,10 @@ and Transliterates digits from one number system to another number systemdigits is binary representation of a number
from_system and to_system are number system names in atom form. See
Cldr.Number.System.systems_with_digits/0 for available number systems.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.Transliterate.transliterate_digits "٠١٢٣٤٥٦٧٨٩", :arab, :latn
"0123456789"
@@ -356,7 +354,7 @@ and
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Number.html b/Plausible.Cldr.Number.html
index 29e2bc511..cff5705d2 100644
--- a/Plausible.Cldr.Number.html
+++ b/Plausible.Cldr.Number.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Number — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -119,10 +119,10 @@ There are several classes of formatting including non-scientific, scientific,
rules based (for spelling and ordinal formats), compact formats that display 1k
rather than 1,000 and so on. See Cldr.Number.to_string/2 for specific formatting
options.
-
- non-scientific-notation-formatting
+
+
+ Non-Scientific Notation Formatting
- Non-Scientific Notation Formatting
The following description applies to formats that do not use scientific
notation or significant digits:
If the number of actual integer digits exceeds the maximum integer digits,
@@ -139,10 +139,10 @@ digits, then trailing zeros are added. For example, 0.125 is formatted as
the decimal, where j is less than the maximum fraction digits. For example,
0.10004 is formatted as "0.1" if the maximum fraction digits is four or
less.
-
- scientific-notation-formatting
+
+
+ Scientific Notation Formatting
- Scientific Notation Formatting
Numbers in scientific notation are expressed as the product of a mantissa and
a power of ten, for example, 1234 can be expressed as 1.234 x 10^3. The
@@ -167,10 +167,10 @@ limits the total number of integer and fraction digits that will be shown
in the mantissa; it does not affect parsing. For example, 12345 formatted
with "##0.##E0" is "12.3E3". Exponential patterns may not contain grouping
separators.
-
- significant-digits
+
+
+ Significant Digits
- Significant Digits
There are two ways of controlling how many digits are shows: (a)
significant digits counts, or (b) integer and fraction digit counts. Integer
@@ -186,9 +186,8 @@ possible.
- Link to this section
+ Summary
- Summary
@@ -345,9 +344,8 @@ system name or type.
- Link to this section
-
Functions
+
@@ -373,16 +371,16 @@ Functions
Parse a string locale-aware manner and return
a number.
-
- arguments
+
+
+ Arguments
- Arguments
string is any String.t
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:number is one of :integer, :float,
:decimal or nil. The default is nil
@@ -391,16 +389,16 @@ an integer or a float.
Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag.t. The default is
Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
A number of the requested or default type or
{:error, {exception, error}} if no number could be determined
-
- notes
+
+
+ Notes
- Notes
This function parses a string to return a number but
in a locale-aware manner. It will normalise grouping
@@ -409,24 +407,24 @@ the + and - symbols that
strips any _ characters that might be used for
formatting in a string. It then parses the number
using the Elixir standard library functions.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de")
-{:ok, 1000.34}
+iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de")
+{:ok, 1000.34}
-iex> Plausible.Cldr.Number.parse("-1_000_000.34")
-{:ok, -1000000.34}
+iex> Plausible.Cldr.Number.parse("-1_000_000.34")
+{:ok, -1000000.34}
-iex> Plausible.Cldr.Number.parse("1.000", locale: "de", number: :integer)
-{:ok, 1000}
+iex> Plausible.Cldr.Number.parse("1.000", locale: "de", number: :integer)
+{:ok, 1000}
-iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de", number: :integer)
-{:error,
- {Cldr.Number.ParseError,
- "The string \"+1.000,34\" could not be parsed as a number"}}
+iex> Plausible.Cldr.Number.parse("+1.000,34", locale: "de", number: :integer)
+{:error,
+ {Cldr.Number.ParseError,
+ "The string \"+1.000,34\" could not be parsed as a number"}}
@@ -452,17 +450,17 @@ using the Elixir standard library functions.Resolve curencies from strings within
a list.
-
- arguments
+
+
+ Arguments
- Arguments
list is any list in which currency
names and symbols are expected
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:locale is any valid locale returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
@@ -479,10 +477,10 @@ currency string is close enough to a known currency
string for it to identify definitively a currency code.
It is recommended to use numbers greater than 0.8 in
order to reduce false positives.
-
- notes
+
+
+ Notes
- Notes
The :only and :except options accept a list of
currency codes and/or currency types. The following
@@ -493,22 +491,22 @@ entries.
:all, the default, considers
date of nil and which also is a known ISO4217 currency
:historic is the opposite of :current
:tender considers currencies that are legal tender
:unannotated considers currencies that don't have
"(some string)" in their names. These are usually
financial instruments.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.scan("100 US dollars")
+iex> Plausible.Cldr.Number.scan("100 US dollars")
...> |> Plausible.Cldr.Number.resolve_currencies
-[100, :USD]
+[100, :USD]
-iex> Plausible.Cldr.Number.scan("100 eurosports")
-...> |> Plausible.Cldr.Number.resolve_currencies(fuzzy: 0.75)
-[100, :EUR]
+iex> Plausible.Cldr.Number.scan("100 eurosports")
+...> |> Plausible.Cldr.Number.resolve_currencies(fuzzy: 0.75)
+[100, :EUR]
-iex> Plausible.Cldr.Number.scan("100 dollars des États-Unis")
-...> |> Plausible.Cldr.Number.resolve_currencies(locale: "fr")
-[100, :USD]
+iex> Plausible.Cldr.Number.scan("100 dollars des États-Unis")
+...> |> Plausible.Cldr.Number.resolve_currencies(locale: "fr")
+[100, :USD]
@@ -533,17 +531,17 @@ financial instruments.
Resolve a currency from a string
-
- arguments
+
+
+ Arguments
- Arguments
list is any list in which currency
names and symbols are expected
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:locale is any valid locale returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
@@ -560,16 +558,16 @@ currency string is close enough to a known currency
string for it to identify definitively a currency code.
It is recommended to use numbers greater than 0.8 in
order to reduce false positives.
-
- returns
+
+
+ Returns
- Returns
An ISO4217 currency code as an atom or
{:error, {exception, message}}
-
- notes
+
+
+ Notes
- Notes
The :only and :except options accept a list of
currency codes and/or currency types. The following
@@ -580,24 +578,24 @@ entries.
:all, the default, considers
date of nil and which also is a known ISO4217 currency
:historic is the opposite of :current
:tender considers currencies that are legal tender
:unannotated considers currencies that don't have
"(some string)" in their names. These are usually
financial instruments.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.resolve_currency("US dollars")
-[:USD]
+iex> Plausible.Cldr.Number.resolve_currency("US dollars")
+[:USD]
-iex> Plausible.Cldr.Number.resolve_currency("100 eurosports", fuzzy: 0.75)
-[:EUR]
+iex> Plausible.Cldr.Number.resolve_currency("100 eurosports", fuzzy: 0.75)
+[:EUR]
-iex> Plausible.Cldr.Number.resolve_currency("dollars des États-Unis", locale: "fr")
-[:USD]
+iex> Plausible.Cldr.Number.resolve_currency("dollars des États-Unis", locale: "fr")
+[:USD]
-iex> Plausible.Cldr.Number.resolve_currency("not a known currency", locale: "fr")
-{:error,
- {Cldr.UnknownCurrencyError,
- "The currency \"not a known currency\" is unknown or not supported"}}
+iex> Plausible.Cldr.Number.resolve_currency("not a known currency", locale: "fr")
+{:error,
+ {Cldr.UnknownCurrencyError,
+ "The currency \"not a known currency\" is unknown or not supported"}}
@@ -634,40 +632,40 @@ financial instruments.
-
- arguments
+
+
+ Arguments
- Arguments
list is any list in which percent
and permille symbols are expected
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:locale is any valid locale returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
The default is options[:backend].get_locale()
-
- returns
+
+
+ Returns
- Returns
An :percent or permille or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.resolve_per "11%"
-["11", :percent]
+["11", :percent]
iex> Plausible.Cldr.Number.resolve_per "% of linguists"
-[:percent, " of linguists"]
+[:percent, " of linguists"]
iex> Plausible.Cldr.Number.resolve_per "% of linguists %"
-[:percent, " of linguists ", :percent]
+[:percent, " of linguists ", :percent]
@@ -704,29 +702,29 @@ The default is options[:backend].get_locale()
Resolve and tokenize percent and permille
sybols from strings within a list.
Percent and permille symbols can be identified
at the beginning and/or the end of a string.
-
- arguments
+
+
+ Arguments
- Arguments
list is any list in which percent and
permille symbols are expected
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:locale is any valid locale returned by Cldr.known_locale_names/1
or a t:Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
The default is options[:backend].get_locale()
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.scan("100%")
-...> |> Plausible.Cldr.Number.resolve_pers()
-[100, :percent]
+iex> Plausible.Cldr.Number.scan("100%")
+...> |> Plausible.Cldr.Number.resolve_pers()
+[100, :percent]
@@ -752,54 +750,54 @@ The default is options[:backend].get_locale()
Scans a string locale-aware manner and returns
a list of strings and numbers.
-
- arguments
+
+
+ Arguments
- Arguments
string is any String.t
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:number is one of :integer, :float,
:decimal or nil. The default is nil
meaning that the type auto-detected as either
an integer or a float.
:locale is any locale returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag.t. The default is Plausible.Cldr.get_locale/0.
-
- returns
+
+
+ Returns
- Returns
- A list of strings and numbers
-
- notes
+
+
+ Notes
- Notes
Number parsing is performed by Cldr.Number.Parser.parse/2
and any options provided are passed to that function.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.Number.scan("£1_000_000.34")
-["£", 1000000.34]
+iex> Plausible.Cldr.Number.scan("£1_000_000.34")
+["£", 1000000.34]
-iex> Plausible.Cldr.Number.scan("I want £1_000_000 dollars")
-["I want £", 1000000, " dollars"]
+iex> Plausible.Cldr.Number.scan("I want £1_000_000 dollars")
+["I want £", 1000000, " dollars"]
-iex> Plausible.Cldr.Number.scan("The prize is 23")
-["The prize is ", 23]
+iex> Plausible.Cldr.Number.scan("The prize is 23")
+["The prize is ", 23]
-iex> Plausible.Cldr.Number.scan("The lottery number is 23 for the next draw")
-["The lottery number is ", 23, " for the next draw"]
+iex> Plausible.Cldr.Number.scan("The lottery number is 23 for the next draw")
+["The lottery number is ", 23, " for the next draw"]
-iex> Plausible.Cldr.Number.scan("The loss is -1.000 euros", locale: "de", number: :integer)
-["The loss is ", -1000, " euros"]
+iex> Plausible.Cldr.Number.scan("The loss is -1.000 euros", locale: "de", number: :integer)
+["The loss is ", -1000, " euros"]
@@ -832,21 +830,21 @@ and any options provided are passed to that function.:approximately format for
a locale and number system.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted.
See Cldr.Number.to_string/3 for a description of the available
options.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.to_approx_string 1234
-{:ok, "~1,234"}
+{:ok, "~1,234"}
@@ -879,21 +877,21 @@ options.:at_least format for
a locale and number system.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted.
See Plausible.Cldr.Number.to_string/2 for a description of the available
options.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.to_at_least_string 1234
-{:ok, "1,234+"}
+{:ok, "1,234+"}
@@ -926,21 +924,21 @@ options.:at_most format for
a locale and number system.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted.
See Cldr.Number.to_string/3 for a description of the available
options.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.to_at_most_string 1234
-{:ok, "≤1,234"}
+{:ok, "≤1,234"}
@@ -973,21 +971,21 @@ options.:range format for a locale and number system.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted.
See Cldr.Number.to_string/3 for a description of the available
options.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.Number.to_range_string 1234..5678
-{:ok, "1,234–5,678"}
+{:ok, "1,234–5,678"}
@@ -1019,16 +1017,16 @@ options.
Returns a number formatted into a string according to a format pattern and options.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted.
-
- options
+
+
+ Options
- Options
format: the format style or a format string defining how the number is
formatted. See Cldr.Number.Format for how format strings can be constructed.
@@ -1089,38 +1087,38 @@ with parameters string and tag<
:currency_symbol, :currency_space, :literal, :quote, :percent,
:permille, :minus or :plus. The function must return a string. The
function can be used to wrap format elements in HTML or other tags.
-
- locale-extensions-affecting-formatting
+
+
+ Locale extensions affecting formatting
- Locale extensions affecting formatting
A locale identifier can specify options that affect number formatting.
These options are:
nu: defines the number system to be used if none is specified by the :number_system
option to to_string/2
This key is part of the u extension and
that document should be consulted for details on how to construct a locale identifier with these
extensions.
-
- wrapping-format-elements
+
+
+ Wrapping format elements
- Wrapping format elements
Wrapping elements is particularly useful when formatting a number with a
currency symbol and the requirement is to have different HTML formatting
-applied to the symbol than the number. For example:
iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
+applied to the symbol than the number. For example:iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
...> string, :currency_symbol -> "<span class=\"symbol\">" <> string <> "</span>"
...> string, :number -> "<span class=\"number\">" <> string <> "</span>"
...> string, :currency_space -> "<span>" <> string <> "</span>"
...> string, _other -> string
-...> end)
-{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}
It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3
+
...> end)
+{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}
It is also possible and recommended to use the Phoenix.HTML.Tag.content_tag/3
function if wrapping HTML tags since these will ensure HTML entities are
-correctly encoded. For example:
iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
-...> string, :currency_symbol -> Phoenix.HTML.Tag.content_tag(:span, string, class: "symbol")
-...> string, :number -> Phoenix.HTML.Tag.content_tag(:span, string, class: "number")
-...> string, :currency_space -> Phoenix.HTML.Tag.content_tag(:span, string)
+correctly encoded. For example:iex> Cldr.Number.to_string(100, format: :currency, currency: :USD, wrapper: fn
+...> string, :currency_symbol -> Phoenix.HTML.Tag.content_tag(:span, string, class: "symbol")
+...> string, :number -> Phoenix.HTML.Tag.content_tag(:span, string, class: "number")
+...> string, :currency_space -> Phoenix.HTML.Tag.content_tag(:span, string)
...> string, _other -> string
-...> end)
-{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}
When formatting a number the format is parsed into format elements that might include
+
...> end)
+{:ok, "<span class=\"symbol\">$</span><span class=\"number\">100.00</span>"}
When formatting a number the format is parsed into format elements that might include
a currency symbol, a literal string, inserted text between a currency symbol and the
currency amount, a percent sign, the number itself and several other elements. In
some cases it is helpful to be apply specific formatting to each element.
@@ -1129,92 +1127,92 @@ function as an argument. For each element of the format the wrapper function is
with two parameters: the format element as a string and an atom representing the
element type. The wrapper function is required to return a string that is then
inserted in the final formatted number.
-
- returns
+
+
+ Returns
- Returns
{:ok, string} or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.to_string 12345
-{:ok, "12,345"}
+{:ok, "12,345"}
iex> Plausible.Cldr.Number.to_string 12345, locale: "fr"
-{:ok, "12 345"}
+{:ok, "12 345"}
iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es", minimum_grouping_digits: 1
-{:ok, "1.345,32 €"}
+{:ok, "1.345,32 €"}
iex> Plausible.Cldr.Number.to_string 1345.32, currency: :EUR, locale: "es"
-{:ok, "1345,32 €"}
+{:ok, "1345,32 €"}
iex> Plausible.Cldr.Number.to_string 12345, locale: "fr", currency: "USD"
-{:ok, "12 345,00 $US"}
+{:ok, "12 345,00 $US"}
iex> Plausible.Cldr.Number.to_string 12345, format: "#E0"
-{:ok, "1.2345E4"}
+{:ok, "1.2345E4"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB"
-{:ok, "THB 12,345.00"}
+{:ok, "THB 12,345.00"}
iex> Plausible.Cldr.Number.to_string -12345, format: :accounting, currency: "THB"
-{:ok, "(THB 12,345.00)"}
+{:ok, "(THB 12,345.00)"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
...> locale: "th"
-{:ok, "฿12,345.00"}
+{:ok, "฿12,345.00"}
iex> Plausible.Cldr.Number.to_string 12345, format: :accounting, currency: "THB",
...> locale: "th", number_system: :native
-{:ok, "฿๑๒,๓๔๕.๐๐"}
+{:ok, "฿๑๒,๓๔๕.๐๐"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :long
-{:ok, "1 thousand"}
+{:ok, "1 thousand"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :long, currency: "USD"
-{:ok, "1,244 US dollars"}
+{:ok, "1,244 US dollars"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :short
-{:ok, "1K"}
+{:ok, "1K"}
iex> Plausible.Cldr.Number.to_string 1244.30, format: :short, currency: "EUR"
-{:ok, "€1K"}
+{:ok, "€1K"}
iex> Plausible.Cldr.Number.to_string 1234, format: :spellout
-{:ok, "one thousand two hundred thirty-four"}
+{:ok, "one thousand two hundred thirty-four"}
iex> Plausible.Cldr.Number.to_string 1234, format: :spellout_verbose
-{:ok, "one thousand two hundred and thirty-four"}
+{:ok, "one thousand two hundred and thirty-four"}
iex> Plausible.Cldr.Number.to_string 1989, format: :spellout_year
-{:ok, "nineteen eighty-nine"}
+{:ok, "nineteen eighty-nine"}
iex> Plausible.Cldr.Number.to_string 123, format: :ordinal
-{:ok, "123rd"}
+{:ok, "123rd"}
iex> Plausible.Cldr.Number.to_string 123, format: :roman
-{:ok, "CXXIII"}
+{:ok, "CXXIII"}
iex> Plausible.Cldr.Number.to_string 123, locale: "th-u-nu-thai"
-{:ok, "๑๒๓"}
-
- errors
+{:ok, "๑๒๓"}
+
+
+ Errors
- Errors
An error tuple {:error, reason} will be returned if an error is detected.
-The two most likely causes of an error return are:
- A format cannot be compiled. In this case the error tuple will look like:
iex> Plausible.Cldr.Number.to_string(12345, format: "0#")
- {:error, {Cldr.FormatCompileError,
- "Decimal format compiler: syntax error before: \"#\""}}
- The format style requested is not defined for the
locale and
+The two most likely causes of an error return are:- A format cannot be compiled. In this case the error tuple will look like:
iex> Plausible.Cldr.Number.to_string(12345, format: "0#")
+ {:error, {Cldr.FormatCompileError,
+ "Decimal format compiler: syntax error before: \"#\""}}
- The format style requested is not defined for the
locale and
number_system. This happens typically when the number system is
:algorithmic rather than the more common :numeric. In this case the error
-return looks like:
iex> Plausible.Cldr.Number.to_string(1234, locale: "he", number_system: "hebr")
- {:error, {Cldr.UnknownFormatError,
- "The locale :he with number system :hebr does not define a format :standard"}}
+return looks like:
iex> Plausible.Cldr.Number.to_string(1234, locale: "he", number_system: "hebr")
+ {:error, {Cldr.UnknownFormatError,
+ "The locale :he with number system :hebr does not define a format :standard"}}
@@ -1246,23 +1244,23 @@ return looks like:Same as the execution of to_string/2 but raises an exception if an error would be
returned.
-
- arguments
+
+
+ Arguments
- Arguments
number is an integer, float or Decimal to be formatted
options is a keyword list defining how the number is to be formatted. See
Plausible.Cldr.Number.to_string/2
-
- returns
+
+
+ Returns
- Returns
a formatted number as a string or
raises an exception
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.to_string! 12345
"12,345"
@@ -1303,32 +1301,32 @@ returned.
system name or type.
The number system or number system type must be valid for the
given locale. If a number system type is provided, the
underlying number system is returned.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Cldr.known_locale_names/1
or a Cldr.LanguageTag struct returned by Cldr.Locale.new!/2
system_name is any number system name returned by
Cldr.known_number_systems/0 or a number system type
returned by Cldr.known_number_system_types/0
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.Number.validate_number_system "en", :latn
-{:ok, :latn}
+{:ok, :latn}
iex> Plausible.Cldr.Number.validate_number_system "en", :default
-{:ok, :latn}
+{:ok, :latn}
iex> Plausible.Cldr.Number.validate_number_system "en", :unknown
-{:error,
- {Cldr.UnknownNumberSystemError, "The number system :unknown is unknown"}}
+{:error,
+ {Cldr.UnknownNumberSystemError, "The number system :unknown is unknown"}}
iex> Plausible.Cldr.Number.validate_number_system "zz", :default
-{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
+{:error, {Cldr.InvalidLanguageError, "The language \"zz\" is invalid"}}
@@ -1352,7 +1350,7 @@ returned by
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Rbnf.NumberSystem.html b/Plausible.Cldr.Rbnf.NumberSystem.html
index 42d69235e..d83b81835 100644
--- a/Plausible.Cldr.Rbnf.NumberSystem.html
+++ b/Plausible.Cldr.Rbnf.NumberSystem.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Rbnf.NumberSystem — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -116,9 +116,9 @@ Plausible
Functions to implement the number system rule-based-number-format rules of CLDR.
These rules are defined only on the "und" locale and represent specialised
number formatting.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules
-defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
-...> |> Enum.sort()
-[
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.NumberSystem.rule_sets(:und)
+...> |> Enum.sort()
+[
:armenian_lower,
:armenian_upper,
:cyrillic_lower,
@@ -132,9 +132,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
:roman_upper,
:tamil,
:zz_default
-]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
-"CXXIII"
This particular call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :roman)
-{:ok, "CXXIII"}
+]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.NumberSystem.roman_upper(123, :und)
+"CXXIII"
This particular call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :roman)
+{:ok, "CXXIII"}
@@ -142,9 +142,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
+ Summary
- Summary
@@ -504,9 +503,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
-
Functions
+
@@ -1476,7 +1474,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Rbnf.Ordinal.html b/Plausible.Cldr.Rbnf.Ordinal.html
index 22c840018..b6f48b0fe 100644
--- a/Plausible.Cldr.Rbnf.Ordinal.html
+++ b/Plausible.Cldr.Rbnf.Ordinal.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Rbnf.Ordinal — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -116,20 +116,20 @@ Plausible
Functions to implement the ordinal rule-based-number-format rules of CLDR.
As CLDR notes, the data is incomplete or non-existent for many languages. It
is considered complete for English however.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules
-defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets(:en)
-[:digits_ordinal]
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets(:en)
+[:digits_ordinal]
-iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets("fr")
-...> |> Enum.sort()
-[
+iex> Plausible.Cldr.Rbnf.Ordinal.rule_sets("fr")
+...> |> Enum.sort()
+[
:digits_ordinal,
:digits_ordinal_feminine,
:digits_ordinal_feminine_plural,
:digits_ordinal_masculine,
:digits_ordinal_masculine_plural
-]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.Ordinal.digits_ordinal(123, :en)
-"123rd"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :ordinal)
-{:ok, "123rd"}
+]
A rule can then be invoked on an available rule_set. For example
iex> Plausible.Cldr.Rbnf.Ordinal.digits_ordinal(123, :en)
+"123rd"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :ordinal)
+{:ok, "123rd"}
@@ -137,9 +137,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
+ Summary
- Summary
@@ -187,9 +186,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
-
Functions
+
@@ -301,7 +299,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.Rbnf.Spellout.html b/Plausible.Cldr.Rbnf.Spellout.html
index da1d7d4d7..8fb510c13 100644
--- a/Plausible.Cldr.Rbnf.Spellout.html
+++ b/Plausible.Cldr.Rbnf.Spellout.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr.Rbnf.Spellout — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -116,9 +116,9 @@ Plausible
Functions to implement the spellout rule-based-number-format rules of CLDR.
As CLDR notes, the data is incomplete or non-existent for many languages. It
is considered complete for English however.
The standard public API for RBNF is via the Cldr.Number.to_string/2 function.
The functions on this module are defined at compile time based upon the RBNF rules
-defined in the Unicode CLDR data repository. Available rules are identified by:
iex> Plausible.Cldr.Rbnf.Spellout.rule_sets("en")
-...> |> Enum.sort()
-[
+defined in the Unicode CLDR data repository. Available rules are identified by:iex> Plausible.Cldr.Rbnf.Spellout.rule_sets("en")
+...> |> Enum.sort()
+[
:spellout_cardinal,
:spellout_cardinal_verbose,
:spellout_numbering,
@@ -126,9 +126,9 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
:spellout_numbering_year,
:spellout_ordinal,
:spellout_ordinal_verbose
-]
A rule can then be invoked on an available rule_set. For example:
iex> Plausible.Cldr.Rbnf.Spellout.spellout_ordinal(123, "en")
-"one hundred twenty-third"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :spellout)
-{:ok, "one hundred twenty-three"}
+]
A rule can then be invoked on an available rule_set. For example:
iex> Plausible.Cldr.Rbnf.Spellout.spellout_ordinal(123, "en")
+"one hundred twenty-third"
This call is equivalent to the call through the public API of:
iex> Plausible.Cldr.Number.to_string(123, format: :spellout)
+{:ok, "one hundred twenty-three"}
@@ -136,9 +136,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
+ Summary
- Summary
@@ -290,9 +289,8 @@ defined in the Unicode CLDR data repository. Available rules are identified by:
- Link to this section
-
Functions
+
@@ -690,7 +688,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Cldr.html b/Plausible.Cldr.html
index 159e1f1f8..441b020ae 100644
--- a/Plausible.Cldr.html
+++ b/Plausible.Cldr.html
@@ -4,20 +4,20 @@
-
+
Plausible.Cldr — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -126,9 +126,8 @@ territories.
- Link to this section
+ Summary
- Summary
@@ -462,9 +461,8 @@ current locale is restored after the function.
- Link to this section
-
Functions
+
@@ -515,29 +513,29 @@ Functions
Returns the default locale.
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.default_locale()
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.default_locale()
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en-001",
cldr_locale_name: :"en-001",
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en-001",
script: :Latn,
territory: :"001",
- transform: %{},
- language_variants: []
-}
+ transform: %{},
+ language_variants: []
+}
@@ -567,12 +565,12 @@ Functions
Returns the default territory when a locale
does not specify one and none can be inferred.
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.default_territory()
+iex> Plausible.Cldr.default_territory()
:"001"
@@ -604,10 +602,10 @@ does not specify one and none can be inferred.
-
- arguments
+
+
+ Arguments
- Arguments
string is any String.t or a 2-element list
of String.t between which the ellipsis is inserted.
backend is any module that includes use Cldr and therefore
@@ -615,10 +613,10 @@ is a
Note that Cldr.default_backend!/0 will raise an exception if
no :default_backend is configured under the :ex_cldr key in
config.exs.
options is a keyword list of options
-
- options
+
+
+ Options
- Options
:locale is any valid locale name returned by Cldr.known_locale_names/1.
The default is Cldr.get_locale/0.
:location determines where to place the ellipsis. The options are
@@ -627,21 +625,21 @@ The default is :before.
:format formats based upon whether the ellipsis
is inserted between words or sentences. The valid options are
:word or :sentence. The default is :sentence.
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.ellipsis "And furthermore"
"And furthermore…"
-iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja
+iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja
"And furthermore…there is much to be done"
iex> Plausible.Cldr.ellipsis "And furthermore", format: :word
"And furthermore …"
-iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja, format: :word
+iex> Plausible.Cldr.ellipsis ["And furthermore", "there is much to be done"], locale: :ja, format: :word
"And furthermore … there is much to be done"
@@ -672,28 +670,28 @@ is inserted between words or sentences. The valid options are
Return the current locale to be used for Cldr functions that
take an optional locale parameter for which a locale is not supplied.
-
- example
+
+
+ Example
- Example
-iex> Plausible.Cldr.put_locale("pl")
+iex> Plausible.Cldr.put_locale("pl")
iex> Plausible.Cldr.get_locale
-%Cldr.LanguageTag{
+%Cldr.LanguageTag{
backend: Elixir.Plausible.Cldr,
canonical_locale_name: "pl",
cldr_locale_name: :pl,
- extensions: %{},
+ extensions: %{},
language: "pl",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :pl,
territory: :PL,
requested_locale_name: "pl",
script: :Latn,
- transform: %{},
- language_variants: []
- }
+ transform: %{},
+ language_variants: []
+ }
@@ -768,17 +766,17 @@ take an optional locale parameter for which a locale is not supplied.Returns either the Gettext locale_name in Cldr format or
false based upon whether the locale name is configured in
Gettext.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_gettext_locale_names/0
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.known_gettext_locale_name "en"
"en"
@@ -814,22 +812,22 @@ take an optional locale parameter for which a locale is not supplied.Returns a boolean indicating if the specified locale
name is configured and available in Gettext.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.known_gettext_locale_name?("en")
+iex> Plausible.Cldr.known_gettext_locale_name?("en")
true
-iex> Plausible.Cldr.known_gettext_locale_name?("!!")
+iex> Plausible.Cldr.known_gettext_locale_name?("!!")
false
@@ -891,17 +889,17 @@ with
Returns either the locale_name or false based upon
whether the locale name is configured in Cldr.
This is helpful when building a list of or expressions
to return the first known locale name from a list.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.known_locale_name :"en-AU"
:"en-AU"
@@ -937,21 +935,21 @@ to return the first known locale name from a list.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.known_locale_name?(:en)
+iex> Plausible.Cldr.known_locale_name?(:en)
true
-iex> Plausible.Cldr.known_locale_name?(:"!!")
+iex> Plausible.Cldr.known_locale_name?(:"!!")
false
@@ -1000,13 +998,13 @@ in this module or in
Returns a list of atoms representing the number systems types known to Cldr.
-
- example
+
+
+ Example
- Example
iex> Plausible.Cldr.known_number_system_types
-[:default, :finance, :native, :traditional]
+ [:default, :finance, :native, :traditional]
@@ -1059,17 +1057,17 @@ in this module or in Returns either the RBNF locale_name or false based upon
whether the locale name is configured in Cldr
and has RBNF rules defined.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by
Plausible.Cldr.known_locale_names/0
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.known_rbnf_locale_name :en
:en
@@ -1106,21 +1104,21 @@ and has RBNF rules defined.Returns a boolean indicating if the specified locale
name is configured and available in Cldr and supports
rules based number formats (RBNF).
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.known_rbnf_locale_name?(:en)
+iex> Plausible.Cldr.known_rbnf_locale_name?(:en)
true
-iex> Plausible.Cldr.known_rbnf_locale_name?(:"!!")
+iex> Plausible.Cldr.known_rbnf_locale_name?(:"!!")
false
@@ -1228,42 +1226,42 @@ of common symbols in numbers, currencies and dates
Set the current locale to be used for Cldr functions that
take an optional locale parameter for which a locale is not supplied.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
or a t:Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1
See rfc5646 for the specification
of a language tag.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.put_locale("en")
-{:ok,
- %Cldr.LanguageTag{
+iex> Plausible.Cldr.put_locale("en")
+{:ok,
+ %Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en",
cldr_locale_name: :en,
- language_subtags: [],
- extensions: %{},
+ language_subtags: [],
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en",
script: :Latn,
territory: :US,
- transform: %{},
- language_variants: []
- }}
+ transform: %{},
+ language_variants: []
+ }}
-iex> Plausible.Cldr.put_locale("invalid-locale!")
-{:error, {Cldr.LanguageTag.ParseError,
- "Expected a BCP47 language tag. Could not parse the remaining \"!\" starting at position 15"}}
+iex> Plausible.Cldr.put_locale("invalid-locale!")
+{:error, {Cldr.LanguageTag.ParseError,
+ "Expected a BCP47 language tag. Could not parse the remaining \"!\" starting at position 15"}}
@@ -1294,23 +1292,23 @@ of a language tag.
Add locale-specific quotation marks around a string.
-
- arguments
+
+
+ Arguments
- Arguments
string is any valid Elixir string
options is a keyword list of options
-
- options
+
+
+ Options
- Options
locale is any valid locale name returned by Cldr.known_locale_names/1.
The default is Cldr.get_locale/0
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.quote "Quoted String"
"“Quoted String”"
@@ -1421,72 +1419,72 @@ return an empty list.
Normalise and validate a locale name.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Plausible.Cldr.known_locale_names/0
or a Cldr.LanguageTag struct returned by Plausible.Cldr.Locale.new!/1
-
- returns
+
+
+ Returns
- Returns
{:ok, language_tag}
{:error, reason}
-
- notes
+
+
+ Notes
- Notes
See rfc5646 for the specification
of a language tag.
-
- examples
+
+
+ Examples
- Examples
-iex> Plausible.Cldr.validate_locale(:en)
-{:ok,
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.validate_locale(:en)
+{:ok,
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en",
cldr_locale_name: :en,
- extensions: %{},
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en",
script: :Latn,
territory: :US,
- transform: %{},
- language_variants: []
-}}
+ transform: %{},
+ language_variants: []
+}}
-iex> Plausible.Cldr.validate_locale Plausible.Cldr.default_locale()
-{:ok,
-%Cldr.LanguageTag{
+iex> Plausible.Cldr.validate_locale Plausible.Cldr.default_locale()
+{:ok,
+%Cldr.LanguageTag{
backend: Plausible.Cldr,
canonical_locale_name: "en-001",
cldr_locale_name: :"en-001",
- extensions: %{},
+ extensions: %{},
gettext_locale_name: "en",
language: "en",
- locale: %{},
- private_use: [],
+ locale: %{},
+ private_use: [],
rbnf_locale_name: :en,
requested_locale_name: "en-001",
script: :Latn,
territory: :"001",
- transform: %{},
- language_variants: []
-}}
+ transform: %{},
+ language_variants: []
+}}
-iex> Plausible.Cldr.validate_locale("zzz")
-{:error, {Cldr.InvalidLanguageError, "The language \"zzz\" is invalid"}}
+iex> Plausible.Cldr.validate_locale("zzz")
+{:error, {Cldr.InvalidLanguageError, "The language \"zzz\" is invalid"}}
@@ -1538,41 +1536,41 @@ of a language tag.
-
- arguments
+
+
+ Arguments
- Arguments
number_system_type is any number system type returned by
Cldr.known_number_system_types/1
-
- returns
+
+
+ Returns
- Returns
{:ok, normalized_number_system_type} or
{:error, {exception, message}}
-
- examples
+
+
+ Examples
- Examples
iex> Plausible.Cldr.validate_number_system_type :default
-{:ok, :default}
+{:ok, :default}
iex> Plausible.Cldr.validate_number_system_type :traditional
-{:ok, :traditional}
+{:ok, :traditional}
iex> Plausible.Cldr.validate_number_system_type :latn
-{
+{
:error,
- {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
-}
+ {Cldr.UnknownNumberSystemTypeError, "The number system type :latn is unknown"}
+}
iex> Plausible.Cldr.validate_number_system_type "bork"
-{
+{
:error,
- {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
-}
+ {Cldr.UnknownNumberSystemTypeError, "The number system type \"bork\" is invalid"}
+}
@@ -1628,16 +1626,16 @@ of a language tag.
-
- arguments
+
+
+ Arguments
- Arguments
locale is any valid locale name returned by Cldr.known_locale_names/1.
fun is any 0-arity function or function capture.
-
- returns
+
+
+ Returns
- Returns
The value returned by the function fun/0 or
{:error, {exception, reason}} if the locale is invalid or
raises an exception if the current locale cannot be
identified.
@@ -1664,7 +1662,7 @@ identified.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ClickhouseEventV2.html b/Plausible.ClickhouseEventV2.html
index 7e10c8e40..33885a161 100644
--- a/Plausible.ClickhouseEventV2.html
+++ b/Plausible.ClickhouseEventV2.html
@@ -4,20 +4,20 @@
-
+
Plausible.ClickhouseEventV2 — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -148,9 +147,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -196,7 +194,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ClickhouseRepo.html b/Plausible.ClickhouseRepo.html
index 6ba72833e..5661ff668 100644
--- a/Plausible.ClickhouseRepo.html
+++ b/Plausible.ClickhouseRepo.html
@@ -4,20 +4,20 @@
-
+
Plausible.ClickhouseRepo — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -443,9 +442,8 @@ pool to disconnect within the given interval.
- Link to this section
-
Functions
+
@@ -818,23 +816,23 @@ pool to disconnect within the given interval.
@@ -1212,7 +1210,7 @@ pool to disconnect within the given interval.See
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ClickhouseSessionV2.BoolUInt8.html b/Plausible.ClickhouseSessionV2.BoolUInt8.html
index cf7356c36..7b4de8886 100644
--- a/Plausible.ClickhouseSessionV2.BoolUInt8.html
+++ b/Plausible.ClickhouseSessionV2.BoolUInt8.html
@@ -4,20 +4,20 @@
-
+
Plausible.ClickhouseSessionV2.BoolUInt8 — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -160,9 +159,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -230,7 +228,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ClickhouseSessionV2.html b/Plausible.ClickhouseSessionV2.html
index a21069db9..5a23df210 100644
--- a/Plausible.ClickhouseSessionV2.html
+++ b/Plausible.ClickhouseSessionV2.html
@@ -4,20 +4,20 @@
-
+
Plausible.ClickhouseSessionV2 — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -148,9 +147,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -196,7 +194,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ConfigHelpers.html b/Plausible.ConfigHelpers.html
index 5426e7400..32f3bd318 100644
--- a/Plausible.ConfigHelpers.html
+++ b/Plausible.ConfigHelpers.html
@@ -4,20 +4,20 @@
-
+
Plausible.ConfigHelpers — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -152,9 +151,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -226,7 +224,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.DataCase.html b/Plausible.DataCase.html
index e30fa0864..145ecdb02 100644
--- a/Plausible.DataCase.html
+++ b/Plausible.DataCase.html
@@ -4,20 +4,20 @@
-
+
Plausible.DataCase — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -141,7 +141,7 @@ of the test unless the test case is marked as async.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.DataMigration.NumericIDs.html b/Plausible.DataMigration.NumericIDs.html
index 8a08c4e63..3cdc0e0d6 100644
--- a/Plausible.DataMigration.NumericIDs.html
+++ b/Plausible.DataMigration.NumericIDs.html
@@ -4,20 +4,20 @@
-
+
Plausible.DataMigration.NumericIDs — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,9 +123,8 @@ priv/data_migrations/NumericIDs/sql
- Link to this section
+ Summary
- Summary
@@ -173,9 +172,8 @@ priv/data_migrations/NumericIDs/sql
- Link to this section
-
Functions
+
@@ -295,7 +293,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.DataMigration.Repo.html b/Plausible.DataMigration.Repo.html
index 494aa9a96..6d39be5ed 100644
--- a/Plausible.DataMigration.Repo.html
+++ b/Plausible.DataMigration.Repo.html
@@ -4,20 +4,20 @@
-
+
Plausible.DataMigration.Repo — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,9 +123,8 @@ outside of the main application supervision tree.
- Link to this section
+ Summary
- Summary
@@ -558,9 +557,8 @@ pool to disconnect within the given interval.
- Link to this section
-
Functions
+
@@ -1125,23 +1123,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
@@ -1591,7 +1589,7 @@ pool to disconnect within the given interval.See
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.DataMigration.html b/Plausible.DataMigration.html
index 02197330a..2f75554dd 100644
--- a/Plausible.DataMigration.html
+++ b/Plausible.DataMigration.html
@@ -4,20 +4,20 @@
-
+
Plausible.DataMigration — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -137,7 +137,7 @@ run via remote shell or otherwise (TBD).
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Ecto.EventName.html b/Plausible.Ecto.EventName.html
index 96b26e5d9..d9ded26b4 100644
--- a/Plausible.Ecto.EventName.html
+++ b/Plausible.Ecto.EventName.html
@@ -4,20 +4,20 @@
-
+
Plausible.Ecto.EventName — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,9 +123,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -201,9 +200,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -359,7 +357,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Event.WriteBuffer.html b/Plausible.Event.WriteBuffer.html
index 356bcfd60..3e4ecc76b 100644
--- a/Plausible.Event.WriteBuffer.html
+++ b/Plausible.Event.WriteBuffer.html
@@ -4,20 +4,20 @@
-
+
Plausible.Event.WriteBuffer — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -180,9 +179,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -316,7 +314,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Factory.html b/Plausible.Factory.html
index 41a0a31d7..ede73f448 100644
--- a/Plausible.Factory.html
+++ b/Plausible.Factory.html
@@ -4,20 +4,20 @@
-
+
Plausible.Factory — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -498,9 +497,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -1562,7 +1560,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Funnel.Step.html b/Plausible.Funnel.Step.html
index 6ae81de30..69fa2e6d6 100644
--- a/Plausible.Funnel.Step.html
+++ b/Plausible.Funnel.Step.html
@@ -4,20 +4,20 @@
-
+
Plausible.Funnel.Step — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -123,9 +123,8 @@ See: Plausible.Funnel
- Link to this section
+ Summary
- Summary
@@ -163,9 +162,8 @@ See: Plausible.Funnel
- Link to this section
-
Types
+
@@ -214,9 +212,8 @@ Types
- Link to this section
-
Functions
+
@@ -264,7 +261,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Funnel.html b/Plausible.Funnel.html
index db9be308f..7c44569df 100644
--- a/Plausible.Funnel.html
+++ b/Plausible.Funnel.html
@@ -4,20 +4,20 @@
-
+
Plausible.Funnel — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -125,9 +125,8 @@ and changeset helpers for enumerating the steps within.Each step referenc
- Link to this section
+ Summary
- Summary
@@ -189,9 +188,8 @@ and changeset helpers for enumerating the steps within.
Each step referenc
- Link to this section
-
Types
+
@@ -240,9 +238,8 @@ Types
- Link to this section
-
Functions
+
@@ -362,7 +359,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Funnels.html b/Plausible.Funnels.html
index 80d376436..3e63fc79a 100644
--- a/Plausible.Funnels.html
+++ b/Plausible.Funnels.html
@@ -4,20 +4,20 @@
-
+
Plausible.Funnels — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -124,9 +124,8 @@ See Plausible.Stats.F
- Link to this section
+ Summary
- Summary
@@ -198,9 +197,8 @@ See Plausible.Stats.F
- Link to this section
-
Functions
+
@@ -426,7 +424,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Geo.html b/Plausible.Geo.html
index 18fc25718..878d1ae97 100644
--- a/Plausible.Geo.html
+++ b/Plausible.Geo.html
@@ -4,20 +4,20 @@
-
+
Plausible.Geo — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -181,9 +180,8 @@ and MaxMind license key.
- Link to this section
-
Functions
+
@@ -228,13 +226,13 @@ Functions
Returns geodatabase type.
Used for deciding whether to show the DB-IP disclaimer or not.
-
- examples
+
+
+ Examples
- Examples
- In the case of a DB-IP database:
iex> database_type()
-"DBIP-City-Lite"
In the case of a MaxMind database:
iex> database_type()
+ In the case of a DB-IP database:
iex> database_type()
+"DBIP-City-Lite"
In the case of a MaxMind database:
iex> database_type()
"GeoLite2-City"
@@ -259,23 +257,23 @@ Functions
Starts the geodatabase loading process. Two modes are supported: local file
and MaxMind license key.
-
- options
+
+
+ Options
- Options
:path - the path to the .mmdb database local file. When present,
:license_key and :edition are not required.
:license_key - the license key
from MaxMind to authenticate requests to MaxMind.
:edition - the name of the MaxMind database to be downloaded from MaxMind
servers. Defaults to GeoLite2-City.
:async - when used, configures the database loading to run
asynchronously.
-
- examples
+
+
+ Examples
- Examples
- Loading from a local file:
iex> load_db(path: "/etc/plausible/dbip-city.mmdb")
-:ok
Downloading a MaxMind DB (this license key is no longer active):
iex> load_db(license_key: "LNpsJCCKPis6XvBP", edition: "GeoLite2-City", async: true)
+ Loading from a local file:
iex> load_db(path: "/etc/plausible/dbip-city.mmdb")
+:ok
Downloading a MaxMind DB (this license key is no longer active):
iex> load_db(license_key: "LNpsJCCKPis6XvBP", edition: "GeoLite2-City", async: true)
:ok
@@ -299,26 +297,26 @@ asynchronously.
Looks up geo info about an IP address.
-
- examples
+
+
+ Examples
- Examples
-iex> lookup("8.7.6.5")
-%{
- "city" => %{
+iex> lookup("8.7.6.5")
+%{
+ "city" => %{
"geoname_id" => 5349755,
- "names" => %{
+ "names" => %{
"de" => "Fontana",
"en" => "Fontana",
"ja" => "フォンタナ",
"ru" => "Фонтана"
- }
- },
- "continent" => %{
+ }
+ },
+ "continent" => %{
"code" => "NA",
"geoname_id" => 6255149,
- "names" => %{
+ "names" => %{
"de" => "Nordamerika",
"en" => "North America",
"es" => "Norteamérica",
@@ -327,12 +325,12 @@ asynchronously."pt-BR" => "América do Norte",
"ru" => "Северная Америка",
"zh-CN" => "北美洲"
- }
- },
- "country" => %{
+ }
+ },
+ "country" => %{
"geoname_id" => 6252001,
"iso_code" => "US",
- "names" => %{
+ "names" => %{
"de" => "Vereinigte Staaten",
"en" => "United States",
"es" => "Estados Unidos",
@@ -341,20 +339,20 @@ asynchronously."pt-BR" => "EUA",
"ru" => "США",
"zh-CN" => "美国"
- }
- },
- "location" => %{
+ }
+ },
+ "location" => %{
"accuracy_radius" => 50,
"latitude" => 34.1211,
"longitude" => -117.4362,
"metro_code" => 803,
"time_zone" => "America/Los_Angeles"
- },
- "postal" => %{"code" => "92336"},
- "registered_country" => %{
+ },
+ "postal" => %{"code" => "92336"},
+ "registered_country" => %{
"geoname_id" => 6252001,
"iso_code" => "US",
- "names" => %{
+ "names" => %{
"de" => "Vereinigte Staaten",
"en" => "United States",
"es" => "Estados Unidos",
@@ -363,13 +361,13 @@ asynchronously."pt-BR" => "EUA",
"ru" => "США",
"zh-CN" => "美国"
- }
- },
- "subdivisions" => [
- %{
+ }
+ },
+ "subdivisions" => [
+ %{
"geoname_id" => 5332921,
"iso_code" => "CA",
- "names" => %{
+ "names" => %{
"de" => "Kalifornien",
"en" => "California",
"es" => "California",
@@ -378,10 +376,10 @@ asynchronously."pt-BR" => "Califórnia",
"ru" => "Калифорния",
"zh-CN" => "加州"
- }
- }
- ]
-}
+ }
+ }
+ ]
+}
@@ -405,7 +403,7 @@ asynchronously.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Goal.html b/Plausible.Goal.html
index 6f9fc923b..a23f4d4be 100644
--- a/Plausible.Goal.html
+++ b/Plausible.Goal.html
@@ -4,20 +4,20 @@
-
+
Plausible.Goal — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -182,9 +181,8 @@ Plausible
- Link to this section
-
Types
+
@@ -234,9 +232,8 @@ Types
- Link to this section
-
Functions
+
@@ -350,7 +347,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Goals.html b/Plausible.Goals.html
index ddb79e19f..b89ca960a 100644
--- a/Plausible.Goals.html
+++ b/Plausible.Goals.html
@@ -4,20 +4,20 @@
-
+
Plausible.Goals — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -180,9 +179,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -331,7 +329,7 @@ funnel record(s) are removed completely along with the targeted goal.
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Google.Api.Mock.html b/Plausible.Google.Api.Mock.html
index 6e7970cc8..b31f5127a 100644
--- a/Plausible.Google.Api.Mock.html
+++ b/Plausible.Google.Api.Mock.html
@@ -4,20 +4,20 @@
-
+
Plausible.Google.Api.Mock — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -144,9 +143,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -192,7 +190,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Google.Api.html b/Plausible.Google.Api.html
index c45204cbf..5565cd72e 100644
--- a/Plausible.Google.Api.html
+++ b/Plausible.Google.Api.html
@@ -4,20 +4,20 @@
-
+
Plausible.Google.Api — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -228,9 +227,8 @@ Plausible
- Link to this section
-
Types
+
@@ -299,9 +297,8 @@ Types
- Link to this section
-
Functions
+
@@ -541,7 +538,7 @@ many times.Useful links:
-
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Google.Buffer.html b/Plausible.Google.Buffer.html
index ea22c6633..9dcf877b4 100644
--- a/Plausible.Google.Buffer.html
+++ b/Plausible.Google.Buffer.html
@@ -4,20 +4,20 @@
-
+
Plausible.Google.Buffer — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -124,9 +124,8 @@ maximum size, defined by max_buffer_size/0.
- Link to this section
+ Summary
- Summary
@@ -218,9 +217,8 @@ maximum size, defined by max_buffer_size/0.
- Link to this section
-
Functions
+
@@ -434,7 +432,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Google.HTTP.html b/Plausible.Google.HTTP.html
index 123151329..4132122b5 100644
--- a/Plausible.Google.HTTP.html
+++ b/Plausible.Google.HTTP.html
@@ -4,20 +4,20 @@
-
+
Plausible.Google.HTTP — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -192,9 +191,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -381,7 +379,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Google.ReportRequest.html b/Plausible.Google.ReportRequest.html
index 491a5c36b..bd1ea74ea 100644
--- a/Plausible.Google.ReportRequest.html
+++ b/Plausible.Google.ReportRequest.html
@@ -4,20 +4,20 @@
-
+
Plausible.Google.ReportRequest — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -158,9 +157,8 @@ Plausible
- Link to this section
-
Types
+
@@ -208,9 +206,8 @@ Types
- Link to this section
-
Functions
+
@@ -256,7 +253,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.HTTPClient.Interface.html b/Plausible.HTTPClient.Interface.html
index 361313106..3b54d174a 100644
--- a/Plausible.HTTPClient.Interface.html
+++ b/Plausible.HTTPClient.Interface.html
@@ -4,20 +4,20 @@
-
+
Plausible.HTTPClient.Interface — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -214,9 +213,8 @@ Plausible
- Link to this section
-
Types
+
@@ -370,9 +368,8 @@ Types
- Link to this section
-
Callbacks
+
@@ -508,7 +505,7 @@ Callbacks
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.HTTPClient.Non200Error.html b/Plausible.HTTPClient.Non200Error.html
index f810b678e..6f0c66aab 100644
--- a/Plausible.HTTPClient.Non200Error.html
+++ b/Plausible.HTTPClient.Non200Error.html
@@ -4,20 +4,20 @@
-
+
Plausible.HTTPClient.Non200Error — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -158,9 +157,8 @@ Plausible
- Link to this section
-
Types
+
@@ -199,9 +197,8 @@ Types
- Link to this section
-
Functions
+
@@ -253,7 +250,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.HTTPClient.html b/Plausible.HTTPClient.html
index 3d8d1ab7b..07432c3e5 100644
--- a/Plausible.HTTPClient.html
+++ b/Plausible.HTTPClient.html
@@ -4,20 +4,20 @@
-
+
Plausible.HTTPClient — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -124,9 +124,8 @@ URL encoding is invoked.
- Link to this section
+ Summary
- Summary
@@ -170,9 +169,8 @@ URL encoding is invoked.
- Link to this section
-
Functions
+
@@ -276,7 +274,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.ImportDeletionRepo.html b/Plausible.ImportDeletionRepo.html
index 18e40c043..82624833f 100644
--- a/Plausible.ImportDeletionRepo.html
+++ b/Plausible.ImportDeletionRepo.html
@@ -4,20 +4,20 @@
-
+
Plausible.ImportDeletionRepo — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -549,9 +548,8 @@ pool to disconnect within the given interval.
- Link to this section
-
Functions
+
@@ -1116,23 +1114,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
-defmodule Demo do
+defmodule Demo do
use Ecto.Schema
@primary_key false
- schema "ecto_ch_demo" do
+ schema "ecto_ch_demo" do
field :a, Ch, type: "UInt64"
field :b, :string
- end
-end
+ end
+end
-rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
-{100_000, nil} = Repo.insert_stream(Demo, rows)
+rows = Stream.map(1..100_000, fn i -> %{a: i, b: to_string(i)} end)
+{100_000, nil} = Repo.insert_stream(Demo, rows)
# schemaless
-{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
+{100_000, nil} = Repo.insert_stream("ecto_ch_demo", rows, types: [a: Ch.Types.u64(), b: :string])
@@ -1560,7 +1558,7 @@ pool to disconnect within the given interval.See
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.Imported.html b/Plausible.Imported.html
index 7d54a4d5b..db66c2af3 100644
--- a/Plausible.Imported.html
+++ b/Plausible.Imported.html
@@ -4,20 +4,20 @@
-
+
Plausible.Imported — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -118,9 +118,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -160,9 +159,8 @@ Plausible
- Link to this section
-
Functions
+
@@ -258,7 +256,7 @@ Functions
Built using
- ExDoc (v0.29.4) for the
+ ExDoc (v0.30.3) for the
Elixir programming language
diff --git a/Plausible.IngestRepo.html b/Plausible.IngestRepo.html
index 7cf926e1e..14c011f1f 100644
--- a/Plausible.IngestRepo.html
+++ b/Plausible.IngestRepo.html
@@ -4,20 +4,20 @@
-
+
Plausible.IngestRepo — Plausible v0.0.1
-
+
-
-
+
+
-
+
@@ -122,9 +122,8 @@ Plausible
- Link to this section
+ Summary
- Summary
@@ -549,9 +548,8 @@ pool to disconnect within the given interval.
- Link to this section
-
Functions
+
@@ -1116,23 +1114,23 @@ pool to disconnect within the given interval.See
-Similar to insert_all/2 but with the following differences:
- accepts rows as streams or lists
- sends rows as a chunked request
- doesn't autogenerate ids or does any other preprocessing
Example:
Repo.query!("create table ecto_ch_demo(a UInt64, b String) engine Null")
+Similar to