Intl NumberFormat does not show the Bitcoin Symbol

0 votes

the Intl.NumberFormat does not show the bitcoin symbol.

CFORMAT_USD = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'USD', minimumFractionDigits: 8 }); 
CFORMAT_BTC = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'BTC', minimumFractionDigits: 8 }); 

console.log(CFORMAT_USD.format(1000));
// 1.000,00000000 $

console.log(CFORMAT_BTC.format(1000));  
// 1.000,00000000 BTC

My workaround at the moment

console.log(CFORMAT_BTC.format(1000).replace(/BTC/,'Ƀ'));
// 1.000,00000000 Ƀ

Is there maybe a better (clean) solution?

Aug 27, 2018 in Blockchain by digger
• 26,740 points
2,413 views

1 answer to this question.

0 votes

According to bitcoin.it (https://en.bitcoin.it/wiki/Bitcoin_symbol),

The ISO 4217 currency code for Bitcoin is XBT. However, at the moment it is an unofficial code according to the ISO 4217 standard.

So the correct code should be

Intl.NumberFormat('de-DE', { style: 'currency', currency: 'XBT' })
answered Aug 27, 2018 by slayer
• 29,370 points

Related Questions In Blockchain

0 votes
2 answers

Why does not India consider Bitcoin as a legal tender?

to be specific there are few logical ...READ MORE

answered Jul 3, 2018 in Blockchain by Priyaj
• 58,020 points
853 views
0 votes
1 answer

Is it possible to claim Bitcoin Cash from an exchange that does not support it?

You can't claim BCH without knowing private ...READ MORE

answered Jul 17, 2018 in Blockchain by aryya
• 7,460 points
739 views
0 votes
1 answer

Bitcoin sendfrom does not process transaction

Try this; $wammount = floatval(trim($_POST['wammount'])); READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
599 views
0 votes
1 answer

"[RuntimeException] The "-t" option does not exist" error in Hyperledger composer.

This command runs on composer-cli. Have you ...READ MORE

answered Nov 21, 2018 in Blockchain by Omkar
• 69,220 points
1,549 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,427 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP