globalize icon indicating copy to clipboard operation
globalize copied to clipboard

Globalize date formatter prints quotes around string literals when using short formats

Open danielt998 opened this issue 3 months ago • 0 comments

When running the following

var Globalize = require( "globalize" );
Globalize.load( require( "cldr-data" ).entireSupplemental() );
Globalize.load( require( "cldr-data" ).entireMainFor( "en", "es", "bg" ) );
console.log("Globalize curr with formatCurrency:" + Globalize("bg").formatCurrency(11231241223, "BGN", {
   compact: "short"
}));

console.log("Globalize curr with currencyFormatter:" + Globalize("bg").currencyFormatter("BGN", {
     compact: "short"
})(11231241223)); 

we get:

Globalize curr with formatCurrency:11 млрд'.' лв.
Globalize curr with currencyFormatter:11 млрд'.' лв.

I believe this is incorrect, and that the single quotes should not be there

The data is coming, I believe, from here

danielt998 avatar Mar 29 '24 16:03 danielt998