MeridianMERIDIAN

Currency Amount (EU Suffix)

finance.currency.amount_comma_suffix

European format with currency symbol as suffix. Period for thousands, comma for decimal, symbol after amount with optional space. CLDR default for Germany, France, Spain, Italy, Netherlands.

Operations on this type: Parse nested values

Try a value

Currency Amount (EU Suffix)'s rule accepts it.

Reads it as 1234.56

Also accepted by

Use it

Shell
finetype infer -i '1.234,56 €' --mode column
# → finance.currency.amount_comma_suffix
DuckDB
SELECT ft_infer('1.234,56 €');
-- → 'finance.currency.amount_comma_suffix'
Cast template: {col} is your column
CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[€$£¥₹₩₿\p{Sc}]', '', 'g'), '\s+', '', 'g'), '\.', '', 'g'), ',', '.') AS DECIMAL(18,2))

How finetype reads the samples

DuckDB 1.5.5 · finetype 0.6.66

ValueAs VARCHARnumeric_valuesymbol
1.234,56 €1234.561234.56€
999,99 €999.99999.99€
-1.234,56 €-1234.56-1234.56€
0,50 €0.500.50€
10.000,00 €10000.0010000.00€

Pattern

Regular expression
^-?[0-9]{1,3}(\.[0-9]{3})*(,[0-9]{1,2})?\s?[€$£¥₹₩₿\p{Sc}]$
ValueLengthShape
1.234,56 €10not checked
999,99 €8not checked
-1.234,56 €11not checked
0,50 €6not checked
10.000,00 €11not checked

pattern uses syntax this checker does not support

Background

Origin

FineType defines amount_comma_suffix itself, as a European currency format with the currency symbol after the amount, a period for thousands and a comma for the decimal.[1] FineType keeps amount_comma_suffix distinct from its amount_comma type, which also allows the symbol before the amount.[1]

CLDR's German locale data gives a comma as the decimal symbol and a full stop as the grouping symbol.[2] In LDML number patterns, the thousands separator and decimal separator are always written as ASCII ',' and '.', and are substituted with the locale's own values.[3] In LDML number patterns, the ¤ character is replaced by the localised currency symbol for the currency being formatted.[3]

Depending on the convention in each nation, the euro sign can either precede or follow the value.[4] Countries have generally continued the style they used for their former currencies when placing the euro sign.[4] In English the euro sign is usually placed before the figure, unspaced, which is the reverse of usage in many other European languages.[4]

Use

Python's Babel library documents format_currency(1099.98, 'EUR', locale='de_DE') as returning 1.099,98 followed by \xa0 and the euro sign.[5] Babel's parse_decimal reads '1.099,98' as Decimal('1099.98') under the de locale.[5]

Wikipedia's table of digit-grouping conventions lists the form 1.234.567,89 for countries including Austria, Germany, Italy and the Netherlands.[6] Treat a full stop as a thousands separator only once you are sure the whole column follows this convention; a value such as 1.234 on its own does not say which reading is meant. (Meridian's view) Split the symbol into its own column before casting, since a column in this shape can mix currencies and the symbol is the only thing that says which one each row is in. (Meridian's view)

How it's detected

CLDR default for most eurozone countries. Distinct from amount_comma which allows prefix symbols.

Schema

https://meridian.online/schemas/finance.currency.amount_comma_suffix · Frictionless type string

finetype taxonomy finance.currency.amount_comma_suffix -o json-schema

Aliases

amount_eu_suffixeu_suffix

Type Registry