Based on information from the Royal Spanish Academy, it is customary in Spanish to group numbers in sets of three, with spaces in between, when the number exceeds four digits, meaning it has at least five (Reference: https://www.rae.es/dpd/números, section 2.a, written in Spanish).
Interestingly, I noticed that for five-digit numbers, the formatting remains consistent with both de-DE
and es-ES
, showing a dot as the separator:
let number2 = 10000
console.log(new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(number2));
console.log(new Intl.NumberFormat('es-ES', { style: 'currency', currency: 'EUR' }).format(number2));
This results in:
10.000,00 €
10.000,00 €
While the use of a dot for separation may not be entirely accurate*, the fact that no grouping occurs for four-digit numbers aligns with the guidelines set forth by the RAE.
* Interestingly, even in German language, according to Duden, it is recommended to use spaces instead of dots for this purpose, as seen on (written in German).