phone-number.locale
added in 8.12.4-3
Locale support for phone-number
all-arg
added in 8.12.16-1
Map of locales (keywords) to Locale values suitable to be passed as arguments.
all-arg-vec
added in 8.12.16-1
Vector of locales (keywords) suitable to be used as arguments.
by-val-arg
added in 8.12.16-1
Map of Locale values to locales (keywords) suitable to be passed as method arguments.
by-val-arg-vec
added in 8.12.16-1
Vector of locales (Locale values) suitable to be used as method arguments.
generate-sample
added in 8.12.4-3
(generate-sample)
(generate-sample rng)
Generates random locale.
generate-sample-val
added in 8.12.4-3
(generate-sample-val)
(generate-sample-val rng)
Generates random locale (string value).
parse
added in 8.12.4-3
(parse locale-specification)
(parse locale-specification use-infer)
Parses locale. If it is a java.util.Locale
object it returns it. If it’s not keyword then it parses it by calling trptr.java-wrapper.locale/locale
. If it is a keyword it first tries to infer a namespace (if not present and the use-infer
is set to some truthy value) and then looks it up in locales map. If the value is found, returns the associated Locale
object. Otherwise it falls back to getting locale using the function from trptr.java-wrapper.locale/locale
(before doing so it strips any namespace from a keyword, if found).
strictly-valid-arg?
added in 8.12.4-3
(strictly-valid-arg? locale-specification)
(strictly-valid-arg? locale-specification use-infer)
Returns true
if the given locale specification is valid and supported, false
otherwise. For nil
it returns false
and for keywords it only checks if they are in the locale map (phone-number.locale/all
). If the key is not there, it returns false
. Namespace inference is supported using the second argument (the default is not to infer).
strictly-valid?
added in 8.12.16-1
(strictly-valid? locale-specification)
(strictly-valid? locale-specification use-infer)
Returns true
if the given locale specification is valid and supported, false
otherwise. For nil
it returns false
and for keywords it only checks if they are in the locale map (phone-number.locale/all
). If the key is not there, it returns false
. Namespace inference is supported using the second argument (the default is not to infer).
valid-arg?
added in 8.12.4-3
(valid-arg? locale-specification)
(valid-arg? locale-specification use-infer)
(valid-arg? locale-specification use-infer strict)
Returns true
if the given locale specification is valid and supported, false
otherwise. For nil
it returns true
assuming it will be a default, system locale. If strict
flag is set then for nil value it returns false
and for keywords it only checks if they are in the locale map (phone-number.locale/all
).
valid?
added in 8.12.16-1
(valid? locale-specification)
(valid? locale-specification use-infer)
(valid? locale-specification use-infer strict)
Returns true
if the given locale specification is valid and supported, false
otherwise. For nil
it returns true
assuming it will be a default, system locale. If strict
flag is set then for nil value it returns false
and for keywords it only checks if they are in the locale map (phone-number.locale/all
).