configuredFormat($id)
Retrieves a format instance via its configuration ID and initializes it. This function enables access to preconfigured formatting defined in the Service Editor under "Format configurations" and can be used for parse() or format() calls.
| name | Type | Type Description | Mandatory | Default |
|---|---|---|---|---|
| id | Character string | The configuration ID of the format to be retrieved. | yes |
Type: Format
A format instance that can be used for parse() or format() calls. Throws an error message for invalid input, with references to available format definitions.
configuredFormat("short-date").format(date(2012, 11, 31))
Output: 31.12.12
configuredFormat("euro").format(123456.5)
Output: 123,456.50 €
configuredFormat("number").parse("1.234,56")
Output: 1,234.56