MeridianMERIDIAN

Currency Amount (Space-Separated Thousands)

finance.currency.amount_space

European variant using thin space or regular space for thousands grouping, comma for decimal, symbol as suffix. French, Polish, Czech formatting convention. Watch for NBSP (U+00A0).

Worked samples

DuckDB 1.5.5 · finetype 0.6.64

ValueAs VARCHARnumeric_valuesymbol
1 234,56 €1234.561234.56€
999,99 €999.99999.99€
-1 234,56 €-1234.56-1234.56€
10 000,00 €10000.0010000.00€

Shape

Pattern
^-?[0-9]{1,3}([\s\x{00A0}][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
10 000,00 €11not checked

pattern uses syntax this checker does not support

Background

Origin

Resolution 10 of the 22nd General Conference on Weights and Measures, held in 2003, declared that the decimal marker shall be either the point on the line or the comma on the line.[1] Grouping with a space rather than a dot or comma is a neat way to keep the thousands apart from the decimals, whichever decimal mark a country uses. (Meridian's view)

In French typography, as the Office québécois de la langue française describes it, currency symbols are written to the right of the number.[2] The Office québécois de la langue française also says the currency symbol is separated from the number by a space.[2] The Office québécois de la langue française treats the space between groups of three digits as optional for four-digit numbers.[2]

In the Unicode Common Locale Data Repository (CLDR), the Polish locale's decimal symbol is a comma and its grouping symbol is a space.[3] CLDR's standard currency pattern for Polish is #,##0.00 ¤, which puts the currency sign after the amount.[3]

Use

MDN's documentation for Intl.NumberFormat's format() warns that its output may use non-breaking spaces and should not be compared to hardcoded constants.[4]

Turn the comma into a full stop only after the spaces are gone, and keep the currency symbol in its own column rather than throwing it away. (Meridian's view)

Detection notes

New in format coverage expansion. French/Polish/Czech convention. Must handle both regular space and NBSP (U+00A0) as grouping separator.

Use it

CLI · DuckDB
$ finetype infer -i "1 234,56 €" --mode column
→ finance.currency.amount_space

SELECT ft_infer('1 234,56 €');
-- → 'finance.currency.amount_space'
Cast expression
CAST(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE(REGEXP_REPLACE({col}, '[€$£¥₹₩₿\p{Sc}]', '', 'g'), '[\s\x{00A0}]+', '', 'g'), ',', '.'), '\.$', '') AS DECIMAL(18,2))

Schema

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

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

Aliases

amount_space_sepfr_amount

Type Registry