Date & Time

PyLocale

Python stdlib module — locale. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.atof()Neutral
#
Signature
atof(string, func)

Parses a string as a float according to the locale settings.

.atoi()Neutral
#
Signature
atoi(string)

Converts a string to an integer according to the locale settings.

.bind_textdomain_codeset()Neutral
#
Signature
bind_textdomain_codeset(domain, codeset)

Bind the C library's domain to codeset.

.bindtextdomain()Neutral
#
Signature
bindtextdomain(domain, dir)

Bind the C library's domain to dir.

.currency()Neutral
#
Signature
currency(val, symbol, grouping, international)

Formats val according to the currency settings

.dcgettext()Neutral
#
Signature
dcgettext(domain, msg, category)

Return translation of msg in domain and category.

.delocalize()Neutral
#
Signature
delocalize(string)

Parses a string as a normalized number according to the locale settings.

.dgettext()Neutral
#
Signature
dgettext(domain, msg)

dgettext(domain, msg) -> string

.format()Neutral
#
Signature
format(percent, value, grouping, monetary, additional)

Deprecated, use format_string instead.

.format_string()Neutral
#
Signature
format_string(f, val, grouping, monetary)

Formats a string in the same way that the % formatting would use,

Fully-Qualified Names

FQNField
localefqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import locale