Prism · Locale
$localeMoney
An amount as money, the way a reader in a given locale expects it. The value is in minor units (cents) unless minorUnits is false. locale is required: there is no default, because any default is wrong for most readers.
{ price_cents: 4500, currency: 'EUR' }{
$localeMoney: {
value: { $ref: '$.price_cents' },
currency: { $ref: '$.currency' },
locale: 'en-IE',
},
}'€45.00'
Runs in this page on the installed package. The input and the expected output are defined by the example.