Ordinal
Synopsis
Converts numbers to ordinal format in multiple languages.
Schema
- ordinal:
field: <ident>
target_field: <string>
language: <string>
format: <string>
case: <string>
date_format: <string>
gender: <string>
superscript: <boolean>
space_before_suffix: <boolean>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>
Configuration
The following fields are used to define the processor:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing number or date to convert |
target_field | N | Same as field | Target field to store ordinal result |
language | N | en | Language code (en, es, fr, de, it, pt, nl, ru, ja, zh) |
format | N | suffix | Output format (suffix, word, both, number_suffix) |
case | N | lower | Text case (lower, upper, title, sentence) |
date_format | N | - | Custom date format with ordinals using {day} placeholder |
gender | N | - | Gender for languages with gender (masculine, feminine, neuter) |
superscript | N | false | Output ordinal suffix with HTML superscript tags |
space_before_suffix | N | false | Add space before ordinal suffix |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if conversion fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | Identifier |