exchange 0.12.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +1 -0
- data/README.rdoc +34 -6
- data/Rakefile +3 -30
- data/changelog.rdoc +6 -0
- data/exchange.gemspec +3 -6
- data/iso4217.yml +238 -81
- data/lib/exchange.rb +2 -1
- data/lib/exchange/base.rb +3 -2
- data/lib/exchange/cache.rb +1 -0
- data/lib/exchange/cache/base.rb +2 -1
- data/lib/exchange/cache/configuration.rb +2 -1
- data/lib/exchange/cache/file.rb +2 -1
- data/lib/exchange/cache/memcached.rb +2 -1
- data/lib/exchange/cache/memory.rb +2 -1
- data/lib/exchange/cache/no_cache.rb +2 -1
- data/lib/exchange/cache/rails.rb +2 -1
- data/lib/exchange/cache/redis.rb +2 -1
- data/lib/exchange/configurable.rb +3 -2
- data/lib/exchange/configuration.rb +8 -5
- data/lib/exchange/core_extensions.rb +2 -1
- data/lib/exchange/core_extensions/cachify.rb +2 -1
- data/lib/exchange/core_extensions/float/error_safe.rb +2 -1
- data/lib/exchange/core_extensions/numeric/conversability.rb +2 -1
- data/lib/exchange/external_api.rb +3 -1
- data/lib/exchange/external_api/base.rb +2 -1
- data/lib/exchange/external_api/call.rb +2 -1
- data/lib/exchange/external_api/configuration.rb +18 -3
- data/lib/exchange/external_api/ecb.rb +2 -1
- data/lib/exchange/external_api/json.rb +2 -1
- data/lib/exchange/external_api/open_exchange_rates.rb +2 -1
- data/lib/exchange/external_api/random.rb +31 -0
- data/lib/exchange/external_api/xavier_media.rb +2 -1
- data/lib/exchange/external_api/xml.rb +2 -1
- data/lib/exchange/gem_loader.rb +2 -1
- data/lib/exchange/helper.rb +2 -1
- data/lib/exchange/iso.rb +29 -13
- data/lib/exchange/money.rb +35 -9
- data/lib/exchange/typecasting.rb +2 -1
- data/spec/exchange/cache/base_spec.rb +2 -1
- data/spec/exchange/cache/configuration_spec.rb +4 -1
- data/spec/exchange/cache/file_spec.rb +2 -1
- data/spec/exchange/cache/memcached_spec.rb +2 -1
- data/spec/exchange/cache/memory_spec.rb +4 -2
- data/spec/exchange/cache/no_cache_spec.rb +2 -1
- data/spec/exchange/cache/rails_spec.rb +2 -1
- data/spec/exchange/cache/redis_spec.rb +2 -1
- data/spec/exchange/configuration_spec.rb +6 -2
- data/spec/exchange/core_extensions/array/cachify_spec.rb +2 -1
- data/spec/exchange/core_extensions/float/error_safe_spec.rb +2 -1
- data/spec/exchange/core_extensions/hash/cachify_spec.rb +2 -1
- data/spec/exchange/core_extensions/numeric/cachify_spec.rb +2 -1
- data/spec/exchange/core_extensions/numeric/conversability_spec.rb +2 -1
- data/spec/exchange/core_extensions/string/cachify_spec.rb +2 -1
- data/spec/exchange/core_extensions/symbol/cachify_spec.rb +2 -1
- data/spec/exchange/external_api/base_spec.rb +2 -1
- data/spec/exchange/external_api/call_spec.rb +2 -1
- data/spec/exchange/external_api/configuration_spec.rb +18 -2
- data/spec/exchange/external_api/ecb_spec.rb +2 -1
- data/spec/exchange/external_api/open_exchange_rates_spec.rb +2 -1
- data/spec/exchange/external_api/random_spec.rb +40 -0
- data/spec/exchange/external_api/xavier_media_spec.rb +2 -1
- data/spec/exchange/gem_loader_spec.rb +2 -1
- data/spec/exchange/helper_spec.rb +2 -1
- data/spec/exchange/iso_spec.rb +214 -189
- data/spec/exchange/money_spec.rb +65 -2
- data/spec/exchange/typecasting_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -1
- metadata +10 -10
- data/benchmark/benchmark.rb +0 -50
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
= exchange {<img src="https://secure.travis-ci.org/beatrichartz/exchange.png" />}[http://travis-ci.org/beatrichartz/exchange] {<img src="https://gemnasium.com/beatrichartz/exchange.png" alt="Dependency Status" />}[https://gemnasium.com/beatrichartz/exchange] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/beatrichartz/exchange]
|
1
|
+
= exchange {<img src="https://secure.travis-ci.org/beatrichartz/exchange.png?branch=master" />}[http://travis-ci.org/beatrichartz/exchange] {<img src="https://gemnasium.com/beatrichartz/exchange.png" alt="Dependency Status" />}[https://gemnasium.com/beatrichartz/exchange] {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/beatrichartz/exchange]
|
2
2
|
|
3
|
-
The Exchange Gem gives you easy access to currency functions directly on your Numbers. {It is tested against}[http://travis-ci.org/beatrichartz/exchange]: ruby 1.9, ruby 1.8, ree and rubinius (1.8 and 1.9 mode)
|
3
|
+
The Exchange Gem gives you easy access to currency functions directly on your Numbers. {It is tested against}[http://travis-ci.org/beatrichartz/exchange]: ruby 2.0, 1.9, ruby 1.8, ree and rubinius (1.8 and 1.9 mode). Exchange will in future versions take advantage of 2.0 features, be sure to check this page for updates!
|
4
4
|
|
5
5
|
You can use it with just plain ruby projects, in Rails 2 and 3, Sinatra or whatever Framework you like.
|
6
6
|
|
7
|
+
{<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" />}[http://flattr.com/thing/1096528/]
|
8
|
+
|
7
9
|
== Installation
|
8
10
|
=== Bundler / Rails
|
9
11
|
Add it to your Gemfile
|
@@ -26,6 +28,12 @@ Conversion of currencies does not get any easier
|
|
26
28
|
or better for historic dates
|
27
29
|
1.in(:eur).to(:usd, :at => Time.now - 84600)
|
28
30
|
|
31
|
+
=== Fallbacks for Conversion APIs
|
32
|
+
Never worry if an API is shortly unavailable – Exchange provides the possibility to fall back to other conversion API's if the chosen one is currently not available or does not provide a rate for the attempted conversion. Thus it is possible to combine different API's with incomplete currency sets to have a more complete currency set.
|
33
|
+
|
34
|
+
The performance impact of a fallback if a rate is recognizably not provided by an API is minimal, whereas the performance impact on a http connection error can have a bigger impact on performance.
|
35
|
+
|
36
|
+
The default fallback mechanism used calls the ECB API if the Xavier Media API is unavailable. You can set your own fallback chain using the API configuration.
|
29
37
|
|
30
38
|
=== Precise Calculation
|
31
39
|
|
@@ -91,9 +99,21 @@ You're hitting the internet only daily to get new rates (hourly updates are avai
|
|
91
99
|
One of the issues with currencies is: You never know the format they should be in. With Exchange, you can just use the currencies
|
92
100
|
to_s method, which takes care of the right format for you. You can either have a string with the currency code in front, or just the amount in the right format
|
93
101
|
|
94
|
-
|
95
|
-
|
96
|
-
|
102
|
+
Normal formatting via to_s includes the ISO4217-compatible currency code
|
103
|
+
|
104
|
+
1.in(:usd).to_s #=> "USD 1.00"
|
105
|
+
|
106
|
+
Specify the symbol format will print out the currency with a symbol. If no symbol is associated with a currency, the fallback used is the normally formatted string with the ISO4217-compatible currency code
|
107
|
+
|
108
|
+
1.2.in(:eur).to_s(:symbol) #=> "€1.40"
|
109
|
+
|
110
|
+
Specifying the amount format will print out the formatted amount only
|
111
|
+
|
112
|
+
1440.4.in(:usd).to_s(:amount) #=> "1,440.40"
|
113
|
+
|
114
|
+
As seen above, exchange takes care of the right format for the separators
|
115
|
+
|
116
|
+
155_000_000.in(:usd).to_s #=> "USD 155,000,000.00"
|
97
117
|
|
98
118
|
=== Use three great APIs or your own
|
99
119
|
|
@@ -195,7 +215,15 @@ Convert one currency to another and round, ceil or floor it, it still retains cu
|
|
195
215
|
10.34.in(:usd).to(:nok).ceil(0) #=> #<Exchange::Money @value=45 @currency=:nok>
|
196
216
|
5.34.in(:usd).to(:eur).floor(0) #=> #<Exchange::Money @value=4 @currency=:eur>
|
197
217
|
5.34.in(:usd).to(:eur).floor.from #=> #<Exchange::Money @value=5.34 @currency=:usd>
|
198
|
-
|
218
|
+
|
219
|
+
=== Psychological Pricing
|
220
|
+
|
221
|
+
You can apply psychological pricing by passing the psych argument to the rounding operation
|
222
|
+
|
223
|
+
10.345.in(:usd).round(:psych) #=> 9.99
|
224
|
+
9.999.in(:eur).floor(:psych) #=> 8.99
|
225
|
+
10.345.in(:omr).ceil(:psych) #=> 10.999
|
226
|
+
76.in(:jpy).floor(:psych) #=> 69
|
199
227
|
|
200
228
|
=== Retain Information
|
201
229
|
|
data/Rakefile
CHANGED
@@ -3,44 +3,17 @@
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'bundler'
|
5
5
|
begin
|
6
|
-
Bundler.
|
6
|
+
Bundler.require(:default, :test)
|
7
7
|
rescue Bundler::BundlerError => e
|
8
8
|
$stderr.puts e.message
|
9
9
|
$stderr.puts "Run `bundle install` to install missing gems"
|
10
10
|
exit e.status_code
|
11
11
|
end
|
12
12
|
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "exchange"
|
18
|
-
gem.homepage = "http://github.com/beatrichartz/exchange"
|
19
|
-
gem.license = "MIT"
|
20
|
-
gem.summary = %Q{Simple Exchange Rate operations for your ruby app}
|
21
|
-
gem.description = %Q{The Exchange Gem gives you easy access to currency functions directly on your Numbers. Imagine a conversion as easy as
|
22
|
-
1.in(:eur).to(:usd)
|
23
|
-
or even better
|
24
|
-
1.in(:eur).to(:usd, :at => Time.now - 84600)
|
25
|
-
which gets you an exchange at the rates of yesterday.}
|
26
|
-
gem.email = "exchange_gem@gmail.com"
|
27
|
-
gem.authors = ["Beat Richartz"]
|
28
|
-
# dependencies defined in Gemfile
|
29
|
-
end
|
30
|
-
Jeweler::RubygemsDotOrgTasks.new
|
13
|
+
require 'rspec/core/rake_task'
|
31
14
|
|
32
15
|
task :default => :test
|
33
16
|
|
34
|
-
require 'rspec/core'
|
35
|
-
require 'rspec/core/rake_task'
|
36
17
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
37
18
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
38
|
-
end
|
39
|
-
|
40
|
-
require 'yard'
|
41
|
-
YARD::Rake::YardocTask.new
|
42
|
-
|
43
|
-
# RSpec::Core::RakeTask.new(:rcov) do |spec|
|
44
|
-
# spec.pattern = 'spec/**/*_spec.rb'
|
45
|
-
# spec.rcov = true
|
46
|
-
# end
|
19
|
+
end
|
data/changelog.rdoc
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
= Changes to Exchange
|
2
2
|
|
3
|
+
== 0.12.0
|
4
|
+
- Currencies can now be instantiated via ISO country codes
|
5
|
+
- Setting the host and the port now wipes existing cache clients in favor of a new one
|
6
|
+
- Better Dealing with Big Decimal precisions
|
7
|
+
- JRuby support
|
8
|
+
|
3
9
|
== 0.11.0
|
4
10
|
- Better implementation for preventing implicit conversions, if wished for: Now all operations including comparisons throw errors when implicit conversions are not allowed and currencies are to be converted implicitly.
|
5
11
|
|
data/exchange.gemspec
CHANGED
@@ -6,18 +6,15 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "exchange"
|
7
7
|
s.version = Exchange::VERSION
|
8
8
|
s.authors = ["Beat Richartz"]
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.email = "exchange_gem@gmail.com"
|
9
|
+
s.description = "Simple Money handling for your ruby app – ISO4217-compatible Currency instantiation, conversion, string formatting and more via an intuitive DSL: 1.in(:usd).to(:eur)"
|
10
|
+
s.email = "attr_accessor@gmail.com"
|
12
11
|
s.homepage = "http://beatrichartz.github.com/exchange"
|
13
12
|
s.licenses = ["MIT"]
|
14
13
|
s.require_paths = ["lib"]
|
15
|
-
s.
|
16
|
-
s.summary = "Simple Exchange Rate operations for your ruby app"
|
14
|
+
s.summary = "Simple Money handling for your ruby app"
|
17
15
|
|
18
16
|
s.files = `git ls-files`.split("\n")
|
19
17
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
20
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
21
18
|
s.require_paths = ["lib"]
|
22
19
|
|
23
20
|
s.add_dependency "nokogiri", ">= 1.0.0"
|
data/iso4217.yml
CHANGED
@@ -8,37 +8,51 @@ LAK:
|
|
8
8
|
currency: Kip
|
9
9
|
symbol: ₭
|
10
10
|
SAR:
|
11
|
-
|
11
|
+
separators:
|
12
|
+
major: ','
|
13
|
+
minor: '.'
|
12
14
|
minor_unit: 2
|
13
15
|
currency: Saudi Riyal
|
14
16
|
symbol: ﷼
|
15
17
|
NOK:
|
16
|
-
|
18
|
+
separators:
|
19
|
+
major: '.'
|
20
|
+
minor: ','
|
17
21
|
minor_unit: 2
|
18
22
|
currency: Norwegian Krone
|
19
23
|
symbol: kr
|
20
24
|
USD:
|
21
|
-
|
25
|
+
separators:
|
26
|
+
major: ','
|
27
|
+
minor: '.'
|
22
28
|
minor_unit: 2
|
23
29
|
currency: US Dollar
|
24
30
|
symbol: $
|
25
31
|
RUB:
|
26
|
-
|
32
|
+
separators:
|
33
|
+
major: '.'
|
34
|
+
minor: ','
|
27
35
|
minor_unit: 2
|
28
36
|
currency: Russian Ruble
|
29
37
|
symbol: руб
|
30
38
|
XCD:
|
31
|
-
|
39
|
+
separators:
|
40
|
+
major: ','
|
41
|
+
minor: '.'
|
32
42
|
minor_unit: 2
|
33
43
|
currency: East Caribbean Dollar
|
34
44
|
symbol: $
|
35
45
|
OMR:
|
36
|
-
|
46
|
+
separators:
|
47
|
+
major: ','
|
48
|
+
minor: '.'
|
37
49
|
minor_unit: 3
|
38
50
|
currency: Rial Omani
|
39
51
|
symbol: ﷼
|
40
52
|
AMD:
|
41
|
-
|
53
|
+
separators:
|
54
|
+
major: ','
|
55
|
+
minor: '.'
|
42
56
|
minor_unit: 2
|
43
57
|
currency: Armenian Dram
|
44
58
|
symbol:
|
@@ -51,12 +65,16 @@ KPW:
|
|
51
65
|
currency: North Korean Won
|
52
66
|
symbol: ₩
|
53
67
|
CNY:
|
54
|
-
|
68
|
+
separators:
|
69
|
+
major: ','
|
70
|
+
minor: '.'
|
55
71
|
minor_unit: 2
|
56
72
|
currency: Yuan Renminbi
|
57
73
|
symbol: ¥
|
58
74
|
KES:
|
59
|
-
|
75
|
+
separators:
|
76
|
+
major: ','
|
77
|
+
minor: '.'
|
60
78
|
minor_unit: 2
|
61
79
|
currency: Kenyan Shilling
|
62
80
|
symbol:
|
@@ -65,7 +83,9 @@ KHR:
|
|
65
83
|
currency: Riel
|
66
84
|
symbol: ៛
|
67
85
|
PLN:
|
68
|
-
|
86
|
+
separators:
|
87
|
+
major: ' '
|
88
|
+
minor: ','
|
69
89
|
minor_unit: 2
|
70
90
|
currency: Zloty
|
71
91
|
symbol: zł
|
@@ -74,47 +94,65 @@ MVR:
|
|
74
94
|
currency: Rufiyaa
|
75
95
|
symbol:
|
76
96
|
GTQ:
|
77
|
-
|
97
|
+
separators:
|
98
|
+
major: ','
|
99
|
+
minor: '.'
|
78
100
|
minor_unit: 2
|
79
101
|
currency: Quetzal
|
80
102
|
symbol: Q
|
81
103
|
CLP:
|
82
|
-
|
104
|
+
separators:
|
105
|
+
major: '.'
|
83
106
|
minor_unit: 0
|
84
107
|
currency: Chilean Peso
|
85
108
|
symbol: $
|
86
109
|
INR:
|
110
|
+
separators:
|
111
|
+
major: ','
|
112
|
+
minor: '.'
|
87
113
|
format: ! '#,##,###.##'
|
88
114
|
minor_unit: 2
|
89
115
|
currency: Indian Rupee
|
90
116
|
symbol: ''
|
91
117
|
BZD:
|
92
|
-
|
118
|
+
separators:
|
119
|
+
major: ','
|
120
|
+
minor: '.'
|
93
121
|
minor_unit: 2
|
94
122
|
currency: Belize Dollar
|
95
123
|
symbol: BZ$
|
96
124
|
MYR:
|
97
|
-
|
125
|
+
separators:
|
126
|
+
major: ','
|
127
|
+
minor: '.'
|
98
128
|
minor_unit: 2
|
99
129
|
currency: Malaysian Ringgit
|
100
130
|
symbol: RM
|
101
131
|
HKD:
|
102
|
-
|
132
|
+
separators:
|
133
|
+
major: ','
|
134
|
+
minor: '.'
|
103
135
|
minor_unit: 2
|
104
136
|
currency: Hong Kong Dollar
|
105
137
|
symbol: $
|
106
138
|
COP:
|
107
|
-
|
139
|
+
separators:
|
140
|
+
major: '.'
|
141
|
+
minor: ','
|
108
142
|
minor_unit: 2
|
109
143
|
currency: Colombian Peso
|
110
144
|
symbol: $
|
111
145
|
DKK:
|
112
|
-
|
146
|
+
separators:
|
147
|
+
major: '.'
|
148
|
+
minor: ','
|
113
149
|
minor_unit: 2
|
114
150
|
currency: Danish Krone
|
115
151
|
symbol: kr
|
116
152
|
SEK:
|
117
|
-
|
153
|
+
separators:
|
154
|
+
major: '.'
|
155
|
+
minor: ','
|
118
156
|
minor_unit: 2
|
119
157
|
currency: Swedish Krona
|
120
158
|
symbol: kr
|
@@ -127,7 +165,9 @@ LYD:
|
|
127
165
|
currency: Libyan Dinar
|
128
166
|
symbol:
|
129
167
|
RON:
|
130
|
-
|
168
|
+
separators:
|
169
|
+
major: '.'
|
170
|
+
minor: ','
|
131
171
|
minor_unit: 2
|
132
172
|
currency: New Romanian Leu
|
133
173
|
symbol: lei
|
@@ -140,12 +180,16 @@ BIF:
|
|
140
180
|
currency: Burundi Franc
|
141
181
|
symbol:
|
142
182
|
ARS:
|
143
|
-
|
183
|
+
separators:
|
184
|
+
major: '.'
|
185
|
+
minor: ','
|
144
186
|
minor_unit: 2
|
145
187
|
currency: Argentine Peso
|
146
188
|
symbol: $
|
147
189
|
GIP:
|
148
|
-
|
190
|
+
separators:
|
191
|
+
major: ','
|
192
|
+
minor: '.'
|
149
193
|
minor_unit: 2
|
150
194
|
currency: Gibraltar Pound
|
151
195
|
symbol: £
|
@@ -154,7 +198,9 @@ UYI:
|
|
154
198
|
currency: Uruguay Peso en Unidades Indexadas (URUIURUI)
|
155
199
|
symbol:
|
156
200
|
BOB:
|
157
|
-
|
201
|
+
separators:
|
202
|
+
major: ','
|
203
|
+
minor: '.'
|
158
204
|
minor_unit: 2
|
159
205
|
currency: Boliviano
|
160
206
|
symbol: $b
|
@@ -179,7 +225,9 @@ XOF:
|
|
179
225
|
currency: CFA Franc BCEAO
|
180
226
|
symbol:
|
181
227
|
AED:
|
182
|
-
|
228
|
+
separators:
|
229
|
+
major: ','
|
230
|
+
minor: '.'
|
183
231
|
minor_unit: 2
|
184
232
|
currency: UAE Dirham
|
185
233
|
symbol:
|
@@ -192,7 +240,9 @@ MWK:
|
|
192
240
|
currency: Kwacha
|
193
241
|
symbol:
|
194
242
|
CUP:
|
195
|
-
|
243
|
+
separators:
|
244
|
+
major: ','
|
245
|
+
minor: '.'
|
196
246
|
minor_unit: 2
|
197
247
|
currency: Cuban Peso
|
198
248
|
symbol: ₱
|
@@ -209,7 +259,9 @@ CVE:
|
|
209
259
|
currency: Cape Verde Escudo
|
210
260
|
symbol:
|
211
261
|
TZS:
|
212
|
-
|
262
|
+
separators:
|
263
|
+
major: ','
|
264
|
+
minor: '.'
|
213
265
|
minor_unit: 2
|
214
266
|
currency: Tanzanian Shilling
|
215
267
|
symbol:
|
@@ -266,7 +318,9 @@ MGA:
|
|
266
318
|
currency: Malagasy Ariary
|
267
319
|
symbol:
|
268
320
|
TOP:
|
269
|
-
|
321
|
+
separators:
|
322
|
+
major: ','
|
323
|
+
minor: '.'
|
270
324
|
minor_unit: 2
|
271
325
|
currency: Pa’anga
|
272
326
|
symbol:
|
@@ -275,7 +329,9 @@ MZN:
|
|
275
329
|
currency: Mozambique Metical
|
276
330
|
symbol: MT
|
277
331
|
LVL:
|
278
|
-
|
332
|
+
separators:
|
333
|
+
major: ','
|
334
|
+
minor: '.'
|
279
335
|
minor_unit: 2
|
280
336
|
currency: Latvian Lats
|
281
337
|
symbol: Ls
|
@@ -288,32 +344,43 @@ USS:
|
|
288
344
|
currency: US Dollar (Same day)
|
289
345
|
symbol:
|
290
346
|
BWP:
|
291
|
-
|
347
|
+
separators:
|
348
|
+
major: ','
|
349
|
+
minor: '.'
|
292
350
|
minor_unit: 2
|
293
351
|
currency: Pula
|
294
352
|
symbol: P
|
295
353
|
HNL:
|
296
|
-
|
354
|
+
separators:
|
355
|
+
major: ','
|
356
|
+
minor: '.'
|
297
357
|
minor_unit: 2
|
298
358
|
currency: Lempira
|
299
359
|
symbol: L
|
300
360
|
EUR:
|
301
|
-
|
361
|
+
separators:
|
362
|
+
major: ','
|
363
|
+
minor: '.'
|
302
364
|
minor_unit: 2
|
303
365
|
currency: Euro
|
304
366
|
symbol: €
|
305
367
|
EGP:
|
306
|
-
|
368
|
+
separators:
|
369
|
+
major: ','
|
370
|
+
minor: '.'
|
307
371
|
minor_unit: 2
|
308
372
|
currency: Egyptian Pound
|
309
373
|
symbol: £
|
310
374
|
CHF:
|
311
|
-
|
375
|
+
separators:
|
376
|
+
major: "'"
|
377
|
+
minor: '.'
|
312
378
|
minor_unit: 2
|
313
379
|
currency: Swiss Franc
|
314
|
-
symbol: CHF
|
315
380
|
ILS:
|
316
|
-
|
381
|
+
separators:
|
382
|
+
major: ','
|
383
|
+
minor: '.'
|
317
384
|
minor_unit: 2
|
318
385
|
currency: New Israeli Sheqel
|
319
386
|
symbol: ₪
|
@@ -322,12 +389,16 @@ PYG:
|
|
322
389
|
currency: Guarani
|
323
390
|
symbol: Gs
|
324
391
|
LBP:
|
325
|
-
|
392
|
+
separators:
|
393
|
+
major: ' '
|
394
|
+
minor: '.'
|
326
395
|
minor_unit: 2
|
327
396
|
currency: Lebanese Pound
|
328
397
|
symbol: £
|
329
398
|
ANG:
|
330
|
-
|
399
|
+
separators:
|
400
|
+
major: '.'
|
401
|
+
minor: ','
|
331
402
|
minor_unit: 2
|
332
403
|
currency: Netherlands Antillean Guilder
|
333
404
|
symbol: ƒ
|
@@ -344,7 +415,9 @@ WST:
|
|
344
415
|
currency: Tala
|
345
416
|
symbol:
|
346
417
|
NPR:
|
347
|
-
|
418
|
+
separators:
|
419
|
+
major: ','
|
420
|
+
minor: '.'
|
348
421
|
minor_unit: 2
|
349
422
|
currency: Nepalese Rupee
|
350
423
|
symbol: ₨
|
@@ -353,12 +426,16 @@ KMF:
|
|
353
426
|
currency: Comoro Franc
|
354
427
|
symbol:
|
355
428
|
THB:
|
356
|
-
|
429
|
+
separators:
|
430
|
+
major: ','
|
431
|
+
minor: '.'
|
357
432
|
minor_unit: 2
|
358
433
|
currency: Baht
|
359
434
|
symbol: ฿
|
360
435
|
IRR:
|
361
|
-
|
436
|
+
separators:
|
437
|
+
major: ','
|
438
|
+
minor: '.'
|
362
439
|
minor_unit: 2
|
363
440
|
currency: Iranian Rial
|
364
441
|
symbol: ﷼
|
@@ -367,17 +444,22 @@ SRD:
|
|
367
444
|
currency: Surinam Dollar
|
368
445
|
symbol: $
|
369
446
|
JPY:
|
370
|
-
|
447
|
+
separators:
|
448
|
+
major: ','
|
371
449
|
minor_unit: 0
|
372
450
|
currency: Yen
|
373
451
|
symbol: ¥
|
374
452
|
BRL:
|
375
|
-
|
453
|
+
separators:
|
454
|
+
major: '.'
|
455
|
+
minor: ','
|
376
456
|
minor_unit: 2
|
377
457
|
currency: Brazilian Real
|
378
458
|
symbol: R$
|
379
459
|
UYU:
|
380
|
-
|
460
|
+
separators:
|
461
|
+
major: '.'
|
462
|
+
minor: ','
|
381
463
|
minor_unit: 2
|
382
464
|
currency: Peso Uruguayo
|
383
465
|
symbol: $U
|
@@ -386,12 +468,16 @@ MOP:
|
|
386
468
|
currency: Pataca
|
387
469
|
symbol:
|
388
470
|
BMD:
|
389
|
-
|
471
|
+
separators:
|
472
|
+
major: ','
|
473
|
+
minor: '.'
|
390
474
|
minor_unit: 2
|
391
475
|
currency: Bermudian Dollar
|
392
476
|
symbol: $
|
393
477
|
SZL:
|
394
|
-
|
478
|
+
separators:
|
479
|
+
major: ', '
|
480
|
+
minor: '.'
|
395
481
|
minor_unit: 2
|
396
482
|
currency: Lilangeni
|
397
483
|
symbol:
|
@@ -400,12 +486,16 @@ ETB:
|
|
400
486
|
currency: Ethiopian Birr
|
401
487
|
symbol:
|
402
488
|
JOD:
|
403
|
-
|
489
|
+
separators:
|
490
|
+
major: ','
|
491
|
+
minor: '.'
|
404
492
|
minor_unit: 3
|
405
493
|
currency: Jordanian Dinar
|
406
494
|
symbol:
|
407
495
|
IDR:
|
408
|
-
|
496
|
+
separators:
|
497
|
+
major: '.'
|
498
|
+
minor: ','
|
409
499
|
minor_unit: 2
|
410
500
|
currency: Rupiah
|
411
501
|
symbol: Rp
|
@@ -426,22 +516,30 @@ YER:
|
|
426
516
|
currency: Yemeni Rial
|
427
517
|
symbol: ﷼
|
428
518
|
BAM:
|
429
|
-
|
519
|
+
separators:
|
520
|
+
major: ','
|
521
|
+
minor: '.'
|
430
522
|
minor_unit: 2
|
431
523
|
currency: Convertible Mark
|
432
524
|
symbol: KM
|
433
525
|
AWG:
|
434
|
-
|
526
|
+
separators:
|
527
|
+
major: ','
|
528
|
+
minor: '.'
|
435
529
|
minor_unit: 2
|
436
530
|
currency: Aruban Florin
|
437
531
|
symbol: ƒ
|
438
532
|
NZD:
|
439
|
-
|
533
|
+
separators:
|
534
|
+
major: ','
|
535
|
+
minor: '.'
|
440
536
|
minor_unit: 2
|
441
537
|
currency: New Zealand Dollar
|
442
538
|
symbol: $
|
443
539
|
PEN:
|
444
|
-
|
540
|
+
separators:
|
541
|
+
major: ','
|
542
|
+
minor: '.'
|
445
543
|
minor_unit: 2
|
446
544
|
currency: Nuevo Sol
|
447
545
|
symbol: S/.
|
@@ -450,7 +548,9 @@ AOA:
|
|
450
548
|
currency: Kwanza
|
451
549
|
symbol:
|
452
550
|
KYD:
|
453
|
-
|
551
|
+
separators:
|
552
|
+
major: ','
|
553
|
+
minor: '.'
|
454
554
|
minor_unit: 2
|
455
555
|
currency: Cayman Islands Dollar
|
456
556
|
symbol: $
|
@@ -459,12 +559,16 @@ SLL:
|
|
459
559
|
currency: Leone
|
460
560
|
symbol:
|
461
561
|
TRY:
|
462
|
-
|
562
|
+
separators:
|
563
|
+
major: ','
|
564
|
+
minor: '.'
|
463
565
|
minor_unit: 2
|
464
566
|
currency: Turkish Lira
|
465
567
|
symbol: ''
|
466
568
|
VEF:
|
467
|
-
|
569
|
+
separators:
|
570
|
+
major: '.'
|
571
|
+
minor: ','
|
468
572
|
minor_unit: 2
|
469
573
|
currency: Bolivar Fuerte
|
470
574
|
symbol: Bs
|
@@ -478,7 +582,9 @@ GNF:
|
|
478
582
|
currency: Guinea Franc
|
479
583
|
symbol:
|
480
584
|
BSD:
|
481
|
-
|
585
|
+
separators:
|
586
|
+
major: ','
|
587
|
+
minor: '.'
|
482
588
|
minor_unit: 2
|
483
589
|
currency: Bahamian Dollar
|
484
590
|
symbol: $
|
@@ -487,17 +593,23 @@ DJF:
|
|
487
593
|
currency: Djibouti Franc
|
488
594
|
symbol:
|
489
595
|
HUF:
|
490
|
-
|
596
|
+
separators:
|
597
|
+
major: '.'
|
598
|
+
minor: '.'
|
491
599
|
minor_unit: 2
|
492
600
|
currency: Forint
|
493
601
|
symbol: Ft
|
494
602
|
LTL:
|
495
|
-
|
603
|
+
separators:
|
604
|
+
major: ' '
|
605
|
+
minor: ','
|
496
606
|
minor_unit: 2
|
497
607
|
currency: Lithuanian Litas
|
498
608
|
symbol: Lt
|
499
609
|
MXN:
|
500
|
-
|
610
|
+
separators:
|
611
|
+
major: ','
|
612
|
+
minor: '.'
|
501
613
|
minor_unit: 2
|
502
614
|
currency: Mexican Peso
|
503
615
|
symbol: $
|
@@ -506,7 +618,9 @@ SCR:
|
|
506
618
|
currency: Seychelles Rupee
|
507
619
|
symbol: ₨
|
508
620
|
SGD:
|
509
|
-
|
621
|
+
separators:
|
622
|
+
major: ','
|
623
|
+
minor: '.'
|
510
624
|
minor_unit: 2
|
511
625
|
currency: Singapore Dollar
|
512
626
|
symbol: $
|
@@ -523,7 +637,9 @@ TND:
|
|
523
637
|
currency: Tunisian Dinar
|
524
638
|
symbol:
|
525
639
|
DOP:
|
526
|
-
|
640
|
+
separators:
|
641
|
+
major: ','
|
642
|
+
minor: '.'
|
527
643
|
minor_unit: 2
|
528
644
|
currency: Dominican Peso
|
529
645
|
symbol: RD$
|
@@ -540,7 +656,8 @@ SDG:
|
|
540
656
|
currency: Sudanese Pound
|
541
657
|
symbol:
|
542
658
|
VUV:
|
543
|
-
|
659
|
+
separators:
|
660
|
+
major: ','
|
544
661
|
minor_unit: 0
|
545
662
|
currency: Vatu
|
546
663
|
symbol:
|
@@ -553,7 +670,8 @@ LRD:
|
|
553
670
|
currency: Liberian Dollar
|
554
671
|
symbol: $
|
555
672
|
KRW:
|
556
|
-
|
673
|
+
separators:
|
674
|
+
major: ','
|
557
675
|
minor_unit: 0
|
558
676
|
currency: Won
|
559
677
|
symbol: ₩
|
@@ -562,17 +680,23 @@ MMK:
|
|
562
680
|
currency: Kyat
|
563
681
|
symbol:
|
564
682
|
MUR:
|
565
|
-
|
683
|
+
separators:
|
684
|
+
major: ','
|
685
|
+
minor: '.'
|
566
686
|
minor_unit: 2
|
567
687
|
currency: Mauritius Rupee
|
568
688
|
symbol: ₨
|
569
689
|
PHP:
|
570
|
-
|
690
|
+
separators:
|
691
|
+
major: ','
|
692
|
+
minor: '.'
|
571
693
|
minor_unit: 2
|
572
694
|
currency: Philippine Peso
|
573
695
|
symbol: ₱
|
574
696
|
ZAR:
|
575
|
-
|
697
|
+
separators:
|
698
|
+
major: ' '
|
699
|
+
minor: '.'
|
576
700
|
minor_unit: 2
|
577
701
|
currency: Rand
|
578
702
|
symbol: R
|
@@ -581,7 +705,9 @@ KGS:
|
|
581
705
|
currency: Som
|
582
706
|
symbol: лв
|
583
707
|
GBP:
|
584
|
-
|
708
|
+
separators:
|
709
|
+
major: ','
|
710
|
+
minor: '.'
|
585
711
|
minor_unit: 2
|
586
712
|
currency: Pound Sterling
|
587
713
|
symbol: £
|
@@ -598,12 +724,15 @@ TMT:
|
|
598
724
|
currency: Turkmenistan New Manat
|
599
725
|
symbol:
|
600
726
|
UAH:
|
601
|
-
|
727
|
+
separators:
|
728
|
+
major: ' '
|
729
|
+
minor: ','
|
602
730
|
minor_unit: 2
|
603
731
|
currency: Hryvnia
|
604
732
|
symbol: ₴
|
605
733
|
VND:
|
606
|
-
|
734
|
+
separators:
|
735
|
+
major: '.'
|
607
736
|
minor_unit: 0
|
608
737
|
currency: Dong
|
609
738
|
symbol: ₫
|
@@ -616,7 +745,9 @@ BOV:
|
|
616
745
|
currency: Mvdol
|
617
746
|
symbol:
|
618
747
|
HRK:
|
619
|
-
|
748
|
+
separators:
|
749
|
+
major: '.'
|
750
|
+
minor: ','
|
620
751
|
minor_unit: 2
|
621
752
|
currency: Croatian Kuna
|
622
753
|
symbol: kn
|
@@ -625,7 +756,9 @@ TTD:
|
|
625
756
|
currency: Trinidad and Tobago Dollar
|
626
757
|
symbol: TT$
|
627
758
|
BHD:
|
628
|
-
|
759
|
+
separators:
|
760
|
+
major: ','
|
761
|
+
minor: '.'
|
629
762
|
minor_unit: 3
|
630
763
|
currency: Bahraini Dinar
|
631
764
|
symbol:
|
@@ -638,22 +771,30 @@ RWF:
|
|
638
771
|
currency: Rwanda Franc
|
639
772
|
symbol:
|
640
773
|
MKD:
|
641
|
-
|
774
|
+
separators:
|
775
|
+
major: ','
|
776
|
+
minor: '.'
|
642
777
|
minor_unit: 2
|
643
778
|
currency: Denar
|
644
779
|
symbol: ден
|
645
780
|
AUD:
|
646
|
-
|
781
|
+
separators:
|
782
|
+
major: ' '
|
783
|
+
minor: '.'
|
647
784
|
minor_unit: 2
|
648
785
|
currency: Australian Dollar
|
649
786
|
symbol: $
|
650
787
|
CRC:
|
651
|
-
|
788
|
+
separators:
|
789
|
+
major: '.'
|
790
|
+
minor: ','
|
652
791
|
minor_unit: 2
|
653
792
|
currency: Costa Rican Colon
|
654
793
|
symbol: ₡
|
655
794
|
PKR:
|
656
|
-
|
795
|
+
separators:
|
796
|
+
major: ','
|
797
|
+
minor: '.'
|
657
798
|
minor_unit: 2
|
658
799
|
currency: Pakistan Rupee
|
659
800
|
symbol: ₨
|
@@ -666,7 +807,9 @@ UZS:
|
|
666
807
|
currency: Uzbekistan Sum
|
667
808
|
symbol: лв
|
668
809
|
CZK:
|
669
|
-
|
810
|
+
separators:
|
811
|
+
major: '.'
|
812
|
+
minor: ','
|
670
813
|
minor_unit: 2
|
671
814
|
currency: Czech Koruna
|
672
815
|
symbol: Kč
|
@@ -675,7 +818,9 @@ AZN:
|
|
675
818
|
currency: Azerbaijanian Manat
|
676
819
|
symbol: ман
|
677
820
|
BDT:
|
678
|
-
|
821
|
+
separators:
|
822
|
+
major: ','
|
823
|
+
minor: '.'
|
679
824
|
minor_unit: 2
|
680
825
|
currency: Taka
|
681
826
|
symbol:
|
@@ -692,7 +837,9 @@ MXV:
|
|
692
837
|
currency: Mexican Unidad de Inversion (UDI)
|
693
838
|
symbol:
|
694
839
|
CUC:
|
695
|
-
|
840
|
+
separators:
|
841
|
+
major: ','
|
842
|
+
minor: '.'
|
696
843
|
minor_unit: 2
|
697
844
|
currency: Peso Convertible
|
698
845
|
symbol:
|
@@ -713,17 +860,23 @@ CHW:
|
|
713
860
|
currency: WIR Franc
|
714
861
|
symbol:
|
715
862
|
CAD:
|
716
|
-
|
863
|
+
separators:
|
864
|
+
major: ','
|
865
|
+
minor: '.'
|
717
866
|
minor_unit: 2
|
718
867
|
currency: Canadian Dollar
|
719
868
|
symbol: $
|
720
869
|
JMD:
|
721
|
-
|
870
|
+
separators:
|
871
|
+
major: ','
|
872
|
+
minor: '.'
|
722
873
|
minor_unit: 2
|
723
874
|
currency: Jamaican Dollar
|
724
875
|
symbol: J$
|
725
876
|
BND:
|
726
|
-
|
877
|
+
separators:
|
878
|
+
major: ','
|
879
|
+
minor: '.'
|
727
880
|
minor_unit: 2
|
728
881
|
currency: Brunei Dollar
|
729
882
|
symbol: $
|
@@ -732,7 +885,9 @@ ALL:
|
|
732
885
|
currency: Lek
|
733
886
|
symbol: Lek
|
734
887
|
SVC:
|
735
|
-
|
888
|
+
separators:
|
889
|
+
major: ','
|
890
|
+
minor: '.'
|
736
891
|
minor_unit: 2
|
737
892
|
currency: El Salvador Colon
|
738
893
|
symbol: $
|
@@ -745,7 +900,9 @@ GHS:
|
|
745
900
|
currency: Ghana Cedi
|
746
901
|
symbol:
|
747
902
|
KWD:
|
748
|
-
|
903
|
+
separators:
|
904
|
+
major: ','
|
905
|
+
minor: '.'
|
749
906
|
minor_unit: 3
|
750
907
|
currency: Kuwaiti Dinar
|
751
908
|
symbol:
|