LV
Create a LocalizedValueSpec for locale-aware value formatting.
Shorthand constructor that creates a value formatting spec for numbers, dates, times, and currency values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
Any
|
The value to format (number, date, datetime, time, etc.). |
required |
format_spec
|
FormatSpec
|
IntlFormatter spec like "currency", "decimal", "percent", or a dict with detailed formatting options. |
required |
Returns:
| Type | Description |
|---|---|
LocalizedValueSpec
|
A LocalizedValueSpec instance. |
Examples:
>>> spec = LV(1234.56, "currency")
>>> # Will format as currency in the current locale