Formatting values
Formatting helpers follow the same Angular-pipe style used by Handlebars. You can chain them to combine effects, for example:
Default locale is nl-NL unless noted otherwise.
Date
Formats a date value. The underlying call is C# DateTime.Format(format), so all .NET date format strings are supported. When no format is supplied the Dutch format (nl-NL) is used.
dateFormat format
| Argument | Type | Description |
|---|---|---|
| format | string | .NET date format string. Defaults to dd-MM-yyyy HH:mm (nl-NL). |
Example
Time
Formats a time or datetime value. Defaults to HH:mm when no format is given.
timeFormat format
| Argument | Type | Description |
|---|---|---|
| format | string | .NET time format string. Defaults to HH:mm. |
Example
Currency
Formats a numeric value as a currency string.
currencyFormat currencyCode display digitsInfo locale
| Argument | Type | Description |
|---|---|---|
| currencyCode | string | ISO 4217 currency code, e.g. USD or EUR. |
| display | string | code (default) shows USD; symbol shows $. |
| digitsInfo | string | {minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}, e.g. 1.2-2. |
| locale | string | Locale for number formatting. Defaults to nl-NL. |
Example
Number
Formats a numeric value using a .NET format string. See the Microsoft documentation for all supported formats.
numberFormat format
| Argument | Type | Description |
|---|---|---|
| format | string | .NET numeric format string, e.g. F02, G, N. |
Example
Least amount of decimals
Removes unnecessary trailing zeros from a decimal number.
leastDecimals
Example
Boolean
Replaces a boolean value with custom text. When no strings are provided the server's default .NET environment values are used.
booleanFormat trueString falseString
| Argument | Type | Description |
|---|---|---|
| trueString | string | Text to display for true. |
| falseString | string | Text to display for false. |
Example
Country name
Converts a 2-letter ISO 3166-1 alpha-2 country code into a human-readable country name. If the code is not valid, the original value is returned unchanged.
countryName countryCode language
| Argument | Type | Description |
|---|---|---|
| countryCode | string | ISO 3166-1 alpha-2 country code (e.g. NL, DE). Must be exactly 2 characters. |
| language | string | Optional: language for the output name. Defaults to en. |
Example
Lowercase
Converts all characters in a string to lowercase.
lowercase
Example
Uppercase
Converts all characters in a string to uppercase.
uppercase
Example