Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
773 views
in Technique[技术] by (71.8m points)

localization - Various country's "currency decimal places width" in the iPhone-SDK

I read about NSLocaleCurrencySymbol, but where would I find the variable used to determine the "number of decimal places" used in a country's currency?

I.E. In the USA, it's common to see dollar amounts written with 2 decimal places: $1.23

What about many other countries?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There are a number of other countries that display a different number of decimal places. 2 is the majority, 0 (no cents in their currency, e.g., Japan) is the largest minority, 3 is used in just a few. No other number that I know off. When exchange rates are quoted, more decimals are typically used. The currencies with 0 and 3 that I'm aware of are shown below.

The ISO currency codes can be found at: http://www.iso.org/iso/support/currency_codes_list-1.htm http://en.wikipedia.org/wiki/ISO_4217 or http://www.currency-iso.org/en/home/tables/table-a1.html.

ISO Code           Currency Decimal places

ADP Andoran Peseta 0
AFA Afghani Afghani 0
BEF Belgian franc 0
BHD Bahraini dinar 3
BIF Burundi franc 0
BYB Belorussian rubel (old) 0
BYR Belorussian rubel (new) 0 
CLP Chilean peso 0
COP Colombian peso 0
DJF Djibouti franc 0
ECS Ecuadorian sucre 0
ESP Spanish peseta 0
GNF Guinea franc 0
GRD Greek drachma 0
HUF Hungarian forint 0
IDR Indonesian rupiah 0
IQD Iraqui dinar 3
ITL Italian lira 0
JOD Jordan dinar 3
JPY Japanese yen 0
KMF Comoros franc 0
KRW South Korean won 0
KWD Kuwaiti dinar 3
LAK Laos new kip 0
LUF Luxembourg franc 0
LYD Libyan dinar 3
MGF Madagascan franc 0
MZM Mozambique metical 0
OMR Omani rial 3
PTE Portugese escudo 0
PYG Paraguay guarani 0
ROL Roumanian Lei 0
RWF Rwanda franc 0
TJR Tadzhikistani rubel 0
TMM Turkmenistani manat 0
TND Tunesian dinar 3
TPE Timor escudo 0
TRL Turkish lira 0
TWD New Taiwan dollar 0
UGX Uganda shilling 0
VND Vietnamese dong 0
VUV Vanuata vatu 0
XAF CFA Franc BEAC 0
XOF CFA Franc BCEAO 0
XPF CFP Franc 0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...