money 6.13.5 → 6.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d517e06943977328b7ad20b73554269088b01b947c280cc454f87ef88dfb8e2d
4
- data.tar.gz: 2c7c5ba4c19a5ff2413273cb64443b5628468b083f260f8cdf49c133e3b7319e
3
+ metadata.gz: 766ce2bf89d38cdc9280a79a77e1e6ccf940d1453a6b3d507e1a9ea81fd1d8ca
4
+ data.tar.gz: 9fb7990b6742cc6778733f3369a129e8911ac85f6c796f94f3e120af2e7c9794
5
5
  SHA512:
6
- metadata.gz: f1cbd0d2e7f790a00528531b3f325bffb4ee8aef98917cc1c17232684eeb5ffb66ce56ebd0618146302468e1259cb284d3a96e576c4592fc67db41cddfb14a64
7
- data.tar.gz: 1d3c22cde9570f93dba5f86952b35a952b0dbfc95262c051e36f0829f8ac06669181cf0b10524d0df44123ae2095c60e8301af999f89a1119ac6d252fddcb6dc
6
+ metadata.gz: 3c6f467ccdfac45d2603a7642cf0da25cf0a4057bfa4d03c33a20acb4805b120b8fbe4c9b9cb8bdea6a3cc89d92425c5da19aaf5eef07827e5b16f82d054db13
7
+ data.tar.gz: 749fc675428631b124ec50da09f76f253c7b76cb350262f82dc53de5f334e30bd4d143c1477ab76305ad747c29fb7750ca91976f5f2562d212580cf65158dde7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.14.1
4
+
5
+ - Fix CHF format regression introduced in v6.14.0
6
+ - Fix deprecation warning in #format_decimal_part
7
+
8
+ ## 6.14.0
9
+
10
+ - Fix Bahraini dinar symbol
11
+ - Raise exception when default currency is not set or passed as parameter
12
+ - Allow specifying default_bank as a lambda
13
+ - Allow passing a default format in currencies definition only valid without symbol_position
14
+ - Always allow comparison with zero Money
15
+ - Rename Money.infinite_precision to default_infinite_precision
16
+ - Add Currency.reset! method to reload all the default currency definitions
17
+ - Fix edgecase for Money#allocate when applying to array of all zero values
18
+
19
+ ## 6.13.8
20
+ - Update symbol for XOF
21
+ - Update UYU currency symbol
22
+ - Allow double conversion using same bank
23
+ - Warn when using unsafe serializer for rate import
24
+ - Move Icelandic symbol after the amount
25
+
26
+ ## 6.13.7
27
+ - Improve deprecation warnings for the upcoming major release
28
+
29
+ ## 6.13.6
30
+ - Fix a regression introduced in 6.13.5 that broken RatesStore::Memory subclasses
31
+
3
32
  ## 6.13.5
4
33
  - Raise warning on using Money.default_currency
5
34
  - Raise warning on using default Money.rounding_mode
@@ -54,7 +83,7 @@
54
83
  - Wrap all amount parts when `:html_wrap` option is used
55
84
  - Deprecate `#currency_as_string` and `#currency_as_string=` (in favour of `#with_currency`)
56
85
  - Add `#with_currency` for swapping the currency
57
- - Rewrite allocate/split (fixing some penny loosing issues)
86
+ - Rewrite allocate/split (fixing some penny losing issues)
58
87
 
59
88
  ## 6.11.3
60
89
  - Fix regression: if enabled use i18n locales in Money#to_s
@@ -73,7 +102,7 @@
73
102
  - Added new symbol for bitcoin denomination
74
103
  - Specify custom rounding precision when using `infinite_precision`
75
104
  - Allow splits with sums greater than 1
76
- - Prevent arithmetic methods from loosing reference to the bank
105
+ - Prevent arithmetic methods from losing reference to the bank
77
106
  - Fix coerced zero numeric subtraction
78
107
  - Fix south asian formatting to support whole numbers
79
108
  - Refactor formatting logic
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/money.svg)](https://rubygems.org/gems/money)
4
4
  [![Build Status](https://travis-ci.org/RubyMoney/money.svg?branch=master)](https://travis-ci.org/RubyMoney/money)
5
5
  [![Code Climate](https://codeclimate.com/github/RubyMoney/money.svg)](https://codeclimate.com/github/RubyMoney/money)
6
- [![Coverage Status](https://coveralls.io/repos/RubyMoney/money/badge.svg?branch=master)](https://coveralls.io/r/RubyMoney/money?branch=master)
7
6
  [![Inline docs](https://inch-ci.org/github/RubyMoney/money.svg)](https://inch-ci.org/github/RubyMoney/money)
8
7
  [![License](https://img.shields.io/github/license/RubyMoney/money.svg)](https://opensource.org/licenses/MIT)
9
8
 
@@ -316,11 +315,10 @@ The following example implements an `ActiveRecord` store to save exchange rates
316
315
  ```ruby
317
316
  # rails g model exchange_rate from:string to:string rate:float
318
317
 
319
- # for Rails 5 replace ActiveRecord::Base with ApplicationRecord
320
- class ExchangeRate < ActiveRecord::Base
318
+ class ExchangeRate < ApplicationRecord
321
319
  def self.get_rate(from_iso_code, to_iso_code)
322
320
  rate = find_by(from: from_iso_code, to: to_iso_code)
323
- rate.present? ? rate.rate : nil
321
+ rate&.rate
324
322
  end
325
323
 
326
324
  def self.add_rate(from_iso_code, to_iso_code, rate)
@@ -328,6 +326,14 @@ class ExchangeRate < ActiveRecord::Base
328
326
  exrate.rate = rate
329
327
  exrate.save!
330
328
  end
329
+
330
+ def self.each_rate
331
+ return find_each unless block_given?
332
+
333
+ find_each do |rate|
334
+ yield rate.from, rate.to, rate.rate
335
+ end
336
+ end
331
337
  end
332
338
  ```
333
339
 
@@ -405,7 +411,7 @@ Money.from_amount(2.34567).format #=> "$2.35"
405
411
  To retain the additional precision, you will also need to set `infinite_precision` to `true`.
406
412
 
407
413
  ```ruby
408
- Money.infinite_precision = true
414
+ Money.default_infinite_precision = true
409
415
  Money.from_amount(2.34567).format #=> "$2.34567"
410
416
  ```
411
417
 
@@ -417,12 +423,18 @@ To round to the nearest cent (or anything more precise), you can use the `round`
417
423
  2.34567.round(2) #=> 2.35
418
424
 
419
425
  # Money
420
- Money.infinite_precision = true
426
+ Money.default_infinite_precision = true
421
427
  Money.new(2.34567).format #=> "$0.0234567"
422
428
  Money.new(2.34567).round.format #=> "$0.02"
423
429
  Money.new(2.34567).round(BigDecimal::ROUND_HALF_UP, 2).format #=> "$0.0235"
424
430
  ```
425
431
 
432
+ You can set the default rounding mode by passing one of the `BigDecimal` mode enumerables like so:
433
+ ```ruby
434
+ Money.rounding_mode = BigDecimal::ROUND_HALF_EVEN
435
+ ```
436
+ See [BigDecimal::ROUND_MODE](https://ruby-doc.org/stdlib-2.5.1/libdoc/bigdecimal/rdoc/BigDecimal.html#ROUND_MODE) for more information
437
+
426
438
  ## Ruby on Rails
427
439
 
428
440
  To integrate money in a Rails application use [money-rails](https://github.com/RubyMoney/money-rails).
@@ -486,6 +498,16 @@ Money.new(10_000_00, 'USD').format # => $10.000,00
486
498
  Money.new(10_000_00, 'EUR').format # => €10.000,00
487
499
  ```
488
500
 
501
+ If you need to localize the position of the currency symbol, you
502
+ have to pass it manually. *Note: this will become the default formatting
503
+ behavior in the next version.*
504
+
505
+ ```ruby
506
+ I18n.locale = :fr
507
+ format = I18n.t :format, scope: 'number.currency.format'
508
+ Money.new(10_00, 'EUR').format(format: format) # => 10,00 €
509
+ ```
510
+
489
511
  For the legacy behaviour of "per currency" localization (formatting depends only on currency):
490
512
 
491
513
  ```ruby
@@ -8,6 +8,7 @@
8
8
  "subunit": "Sent",
9
9
  "subunit_to_unit": 100,
10
10
  "symbol_first": false,
11
+ "format": "%n %u",
11
12
  "html_entity": "",
12
13
  "decimal_mark": ".",
13
14
  "thousands_separator": ",",
@@ -39,6 +40,7 @@
39
40
  "subunit": "Centas",
40
41
  "subunit_to_unit": 100,
41
42
  "symbol_first": false,
43
+ "format": "%n %u",
42
44
  "html_entity": "",
43
45
  "decimal_mark": ".",
44
46
  "thousands_separator": ",",
@@ -70,6 +72,7 @@
70
72
  "subunit": "Khoums",
71
73
  "subunit_to_unit": 5,
72
74
  "symbol_first": false,
75
+ "format": "%n %u",
73
76
  "html_entity": "",
74
77
  "decimal_mark": ".",
75
78
  "thousands_separator": ",",
@@ -100,6 +103,7 @@
100
103
  "subunit": "Tennesi",
101
104
  "subunit_to_unit": 100,
102
105
  "symbol_first": false,
106
+ "format": "%n %u",
103
107
  "html_entity": "",
104
108
  "decimal_mark": ".",
105
109
  "thousands_separator": ",",
@@ -8,6 +8,7 @@
8
8
  "subunit": "Fils",
9
9
  "subunit_to_unit": 100,
10
10
  "symbol_first": false,
11
+ "format": "%n %u",
11
12
  "html_entity": "",
12
13
  "decimal_mark": ".",
13
14
  "thousands_separator": ",",
@@ -23,6 +24,7 @@
23
24
  "subunit": "Pul",
24
25
  "subunit_to_unit": 100,
25
26
  "symbol_first": false,
27
+ "format": "%n %u",
26
28
  "html_entity": "",
27
29
  "decimal_mark": ".",
28
30
  "thousands_separator": ",",
@@ -39,6 +41,7 @@
39
41
  "subunit": "Qintar",
40
42
  "subunit_to_unit": 100,
41
43
  "symbol_first": false,
44
+ "format": "%n %u",
42
45
  "html_entity": "",
43
46
  "decimal_mark": ".",
44
47
  "thousands_separator": ",",
@@ -54,6 +57,7 @@
54
57
  "subunit": "Luma",
55
58
  "subunit_to_unit": 100,
56
59
  "symbol_first": false,
60
+ "format": "%n %u",
57
61
  "html_entity": "",
58
62
  "decimal_mark": ".",
59
63
  "thousands_separator": ",",
@@ -84,6 +88,7 @@
84
88
  "subunit": "Cêntimo",
85
89
  "subunit_to_unit": 100,
86
90
  "symbol_first": false,
91
+ "format": "%n %u",
87
92
  "html_entity": "",
88
93
  "decimal_mark": ".",
89
94
  "thousands_separator": ",",
@@ -131,6 +136,7 @@
131
136
  "subunit": "Cent",
132
137
  "subunit_to_unit": 100,
133
138
  "symbol_first": false,
139
+ "format": "%n %u",
134
140
  "html_entity": "&#x0192;",
135
141
  "decimal_mark": ".",
136
142
  "thousands_separator": ",",
@@ -207,6 +213,7 @@
207
213
  "subunit": "Stotinka",
208
214
  "subunit_to_unit": 100,
209
215
  "symbol_first": false,
216
+ "format": "%n %u",
210
217
  "html_entity": "",
211
218
  "decimal_mark": ".",
212
219
  "thousands_separator": ",",
@@ -217,7 +224,7 @@
217
224
  "priority": 100,
218
225
  "iso_code": "BHD",
219
226
  "name": "Bahraini Dinar",
220
- "symbol": "ب.د",
227
+ "symbol": "د.ب",
221
228
  "alternate_symbols": ["BD"],
222
229
  "subunit": "Fils",
223
230
  "subunit_to_unit": 1000,
@@ -238,6 +245,7 @@
238
245
  "subunit": "Centime",
239
246
  "subunit_to_unit": 1,
240
247
  "symbol_first": false,
248
+ "format": "%n %u",
241
249
  "html_entity": "",
242
250
  "decimal_mark": ".",
243
251
  "thousands_separator": ",",
@@ -330,6 +338,7 @@
330
338
  "subunit": "Chertrum",
331
339
  "subunit_to_unit": 100,
332
340
  "symbol_first": false,
341
+ "format": "%n %u",
333
342
  "html_entity": "",
334
343
  "decimal_mark": ".",
335
344
  "thousands_separator": ",",
@@ -361,6 +370,7 @@
361
370
  "subunit": "Kapeyka",
362
371
  "subunit_to_unit": 100,
363
372
  "symbol_first": false,
373
+ "format": "%n %u",
364
374
  "html_entity": "",
365
375
  "decimal_mark": ",",
366
376
  "thousands_separator": " ",
@@ -377,6 +387,7 @@
377
387
  "subunit": null,
378
388
  "subunit_to_unit": 1,
379
389
  "symbol_first": false,
390
+ "format": "%n %u",
380
391
  "html_entity": "",
381
392
  "decimal_mark": ",",
382
393
  "thousands_separator": " ",
@@ -425,6 +436,7 @@
425
436
  "subunit": "Centime",
426
437
  "subunit_to_unit": 100,
427
438
  "symbol_first": false,
439
+ "format": "%n %u",
428
440
  "html_entity": "",
429
441
  "decimal_mark": ".",
430
442
  "thousands_separator": ",",
@@ -440,6 +452,7 @@
440
452
  "subunit": "Rappen",
441
453
  "subunit_to_unit": 100,
442
454
  "symbol_first": true,
455
+ "format": "%u%n",
443
456
  "html_entity": "",
444
457
  "decimal_mark": ".",
445
458
  "thousands_separator": ",",
@@ -532,6 +545,7 @@
532
545
  "subunit": "Centavo",
533
546
  "subunit_to_unit": 100,
534
547
  "symbol_first": false,
548
+ "format": "%n %u",
535
549
  "html_entity": "",
536
550
  "decimal_mark": ".",
537
551
  "thousands_separator": ",",
@@ -564,6 +578,7 @@
564
578
  "subunit": "Centavo",
565
579
  "subunit_to_unit": 100,
566
580
  "symbol_first": false,
581
+ "format": "%n %u",
567
582
  "html_entity": "",
568
583
  "decimal_mark": ".",
569
584
  "thousands_separator": ",",
@@ -579,6 +594,7 @@
579
594
  "subunit": "Haléř",
580
595
  "subunit_to_unit": 100,
581
596
  "symbol_first": false,
597
+ "format": "%n %u",
582
598
  "html_entity": "",
583
599
  "decimal_mark": ",",
584
600
  "thousands_separator": " ",
@@ -594,6 +610,7 @@
594
610
  "subunit": "Centime",
595
611
  "subunit_to_unit": 1,
596
612
  "symbol_first": false,
613
+ "format": "%n %u",
597
614
  "html_entity": "",
598
615
  "decimal_mark": ".",
599
616
  "thousands_separator": ",",
@@ -610,6 +627,7 @@
610
627
  "subunit": "Øre",
611
628
  "subunit_to_unit": 100,
612
629
  "symbol_first": false,
630
+ "format": "%n %u",
613
631
  "html_entity": "",
614
632
  "decimal_mark": ",",
615
633
  "thousands_separator": ".",
@@ -641,6 +659,7 @@
641
659
  "subunit": "Centime",
642
660
  "subunit_to_unit": 100,
643
661
  "symbol_first": false,
662
+ "format": "%n %u",
644
663
  "html_entity": "",
645
664
  "decimal_mark": ".",
646
665
  "thousands_separator": ",",
@@ -671,6 +690,7 @@
671
690
  "subunit": "Cent",
672
691
  "subunit_to_unit": 100,
673
692
  "symbol_first": false,
693
+ "format": "%n %u",
674
694
  "html_entity": "",
675
695
  "decimal_mark": ".",
676
696
  "thousands_separator": ",",
@@ -687,6 +707,7 @@
687
707
  "subunit": "Santim",
688
708
  "subunit_to_unit": 100,
689
709
  "symbol_first": false,
710
+ "format": "%n %u",
690
711
  "html_entity": "",
691
712
  "decimal_mark": ".",
692
713
  "thousands_separator": ",",
@@ -718,6 +739,7 @@
718
739
  "subunit": "Cent",
719
740
  "subunit_to_unit": 100,
720
741
  "symbol_first": false,
742
+ "format": "%n %u",
721
743
  "html_entity": "$",
722
744
  "decimal_mark": ".",
723
745
  "thousands_separator": ",",
@@ -734,6 +756,7 @@
734
756
  "subunit": "Penny",
735
757
  "subunit_to_unit": 100,
736
758
  "symbol_first": false,
759
+ "format": "%n %u",
737
760
  "html_entity": "&#x00A3;",
738
761
  "decimal_mark": ".",
739
762
  "thousands_separator": ",",
@@ -764,6 +787,7 @@
764
787
  "subunit": "Tetri",
765
788
  "subunit_to_unit": 100,
766
789
  "symbol_first": false,
790
+ "format": "%n %u",
767
791
  "html_entity": "",
768
792
  "decimal_mark": ".",
769
793
  "thousands_separator": ",",
@@ -810,6 +834,7 @@
810
834
  "subunit": "Butut",
811
835
  "subunit_to_unit": 100,
812
836
  "symbol_first": false,
837
+ "format": "%n %u",
813
838
  "html_entity": "",
814
839
  "decimal_mark": ".",
815
840
  "thousands_separator": ",",
@@ -826,6 +851,7 @@
826
851
  "subunit": "Centime",
827
852
  "subunit_to_unit": 1,
828
853
  "symbol_first": false,
854
+ "format": "%n %u",
829
855
  "html_entity": "",
830
856
  "decimal_mark": ".",
831
857
  "thousands_separator": ",",
@@ -857,6 +883,7 @@
857
883
  "subunit": "Cent",
858
884
  "subunit_to_unit": 100,
859
885
  "symbol_first": false,
886
+ "format": "%n %u",
860
887
  "html_entity": "$",
861
888
  "decimal_mark": ".",
862
889
  "thousands_separator": ",",
@@ -904,6 +931,7 @@
904
931
  "subunit": "Lipa",
905
932
  "subunit_to_unit": 100,
906
933
  "symbol_first": false,
934
+ "format": "%n %u",
907
935
  "html_entity": "",
908
936
  "decimal_mark": ",",
909
937
  "thousands_separator": ".",
@@ -919,6 +947,7 @@
919
947
  "subunit": "Centime",
920
948
  "subunit_to_unit": 100,
921
949
  "symbol_first": false,
950
+ "format": "%n %u",
922
951
  "html_entity": "",
923
952
  "decimal_mark": ".",
924
953
  "thousands_separator": ",",
@@ -934,6 +963,7 @@
934
963
  "subunit": "",
935
964
  "subunit_to_unit": 1,
936
965
  "symbol_first": false,
966
+ "format": "%n %u",
937
967
  "html_entity": "",
938
968
  "decimal_mark": ",",
939
969
  "thousands_separator": " ",
@@ -994,6 +1024,7 @@
994
1024
  "subunit": "Fils",
995
1025
  "subunit_to_unit": 1000,
996
1026
  "symbol_first": false,
1027
+ "format": "%n %u",
997
1028
  "html_entity": "",
998
1029
  "decimal_mark": ".",
999
1030
  "thousands_separator": ",",
@@ -1019,11 +1050,12 @@
1019
1050
  "priority": 100,
1020
1051
  "iso_code": "ISK",
1021
1052
  "name": "Icelandic Króna",
1022
- "symbol": "kr",
1053
+ "symbol": "kr.",
1023
1054
  "alternate_symbols": ["Íkr"],
1024
1055
  "subunit": null,
1025
1056
  "subunit_to_unit": 1,
1026
- "symbol_first": true,
1057
+ "symbol_first": false,
1058
+ "format": "%n %u",
1027
1059
  "html_entity": "",
1028
1060
  "decimal_mark": ",",
1029
1061
  "thousands_separator": ".",
@@ -1100,6 +1132,7 @@
1100
1132
  "subunit": "Tyiyn",
1101
1133
  "subunit_to_unit": 100,
1102
1134
  "symbol_first": false,
1135
+ "format": "%n %u",
1103
1136
  "html_entity": "",
1104
1137
  "decimal_mark": ".",
1105
1138
  "thousands_separator": ",",
@@ -1115,6 +1148,7 @@
1115
1148
  "subunit": "Sen",
1116
1149
  "subunit_to_unit": 100,
1117
1150
  "symbol_first": false,
1151
+ "format": "%n %u",
1118
1152
  "html_entity": "&#x17DB;",
1119
1153
  "decimal_mark": ".",
1120
1154
  "thousands_separator": ",",
@@ -1131,6 +1165,7 @@
1131
1165
  "subunit": "Centime",
1132
1166
  "subunit_to_unit": 1,
1133
1167
  "symbol_first": false,
1168
+ "format": "%n %u",
1134
1169
  "html_entity": "",
1135
1170
  "decimal_mark": ".",
1136
1171
  "thousands_separator": ",",
@@ -1146,6 +1181,7 @@
1146
1181
  "subunit": "Chŏn",
1147
1182
  "subunit_to_unit": 100,
1148
1183
  "symbol_first": false,
1184
+ "format": "%n %u",
1149
1185
  "html_entity": "&#x20A9;",
1150
1186
  "decimal_mark": ".",
1151
1187
  "thousands_separator": ",",
@@ -1207,6 +1243,7 @@
1207
1243
  "subunit": "Tiyn",
1208
1244
  "subunit_to_unit": 100,
1209
1245
  "symbol_first": false,
1246
+ "format": "%n %u",
1210
1247
  "html_entity": "",
1211
1248
  "decimal_mark": ".",
1212
1249
  "thousands_separator": ",",
@@ -1222,6 +1259,7 @@
1222
1259
  "subunit": "Att",
1223
1260
  "subunit_to_unit": 100,
1224
1261
  "symbol_first": false,
1262
+ "format": "%n %u",
1225
1263
  "html_entity": "&#x20AD;",
1226
1264
  "decimal_mark": ".",
1227
1265
  "thousands_separator": ",",
@@ -1253,6 +1291,7 @@
1253
1291
  "subunit": "Cent",
1254
1292
  "subunit_to_unit": 100,
1255
1293
  "symbol_first": false,
1294
+ "format": "%n %u",
1256
1295
  "html_entity": "&#8360;",
1257
1296
  "decimal_mark": ".",
1258
1297
  "thousands_separator": ",",
@@ -1269,6 +1308,7 @@
1269
1308
  "subunit": "Cent",
1270
1309
  "subunit_to_unit": 100,
1271
1310
  "symbol_first": false,
1311
+ "format": "%n %u",
1272
1312
  "html_entity": "$",
1273
1313
  "decimal_mark": ".",
1274
1314
  "thousands_separator": ",",
@@ -1285,6 +1325,7 @@
1285
1325
  "subunit": "Sente",
1286
1326
  "subunit_to_unit": 100,
1287
1327
  "symbol_first": false,
1328
+ "format": "%n %u",
1288
1329
  "html_entity": "",
1289
1330
  "decimal_mark": ".",
1290
1331
  "thousands_separator": ",",
@@ -1300,6 +1341,7 @@
1300
1341
  "subunit": "Dirham",
1301
1342
  "subunit_to_unit": 1000,
1302
1343
  "symbol_first": false,
1344
+ "format": "%n %u",
1303
1345
  "html_entity": "",
1304
1346
  "decimal_mark": ".",
1305
1347
  "thousands_separator": ",",
@@ -1315,6 +1357,7 @@
1315
1357
  "subunit": "Centime",
1316
1358
  "subunit_to_unit": 100,
1317
1359
  "symbol_first": false,
1360
+ "format": "%n %u",
1318
1361
  "html_entity": "",
1319
1362
  "decimal_mark": ".",
1320
1363
  "thousands_separator": ",",
@@ -1330,6 +1373,7 @@
1330
1373
  "subunit": "Ban",
1331
1374
  "subunit_to_unit": 100,
1332
1375
  "symbol_first": false,
1376
+ "format": "%n %u",
1333
1377
  "html_entity": "",
1334
1378
  "decimal_mark": ".",
1335
1379
  "thousands_separator": ",",
@@ -1360,6 +1404,7 @@
1360
1404
  "subunit": "Deni",
1361
1405
  "subunit_to_unit": 100,
1362
1406
  "symbol_first": false,
1407
+ "format": "%n %u",
1363
1408
  "html_entity": "",
1364
1409
  "decimal_mark": ".",
1365
1410
  "thousands_separator": ",",
@@ -1376,6 +1421,7 @@
1376
1421
  "subunit": "Pya",
1377
1422
  "subunit_to_unit": 100,
1378
1423
  "symbol_first": false,
1424
+ "format": "%n %u",
1379
1425
  "html_entity": "",
1380
1426
  "decimal_mark": ".",
1381
1427
  "thousands_separator": ",",
@@ -1391,6 +1437,7 @@
1391
1437
  "subunit": "Möngö",
1392
1438
  "subunit_to_unit": 100,
1393
1439
  "symbol_first": false,
1440
+ "format": "%n %u",
1394
1441
  "html_entity": "&#x20AE;",
1395
1442
  "decimal_mark": ".",
1396
1443
  "thousands_separator": ",",
@@ -1406,6 +1453,7 @@
1406
1453
  "subunit": "Avo",
1407
1454
  "subunit_to_unit": 100,
1408
1455
  "symbol_first": false,
1456
+ "format": "%n %u",
1409
1457
  "html_entity": "",
1410
1458
  "decimal_mark": ".",
1411
1459
  "thousands_separator": ",",
@@ -1421,6 +1469,7 @@
1421
1469
  "subunit": "Khoums",
1422
1470
  "subunit_to_unit": 5,
1423
1471
  "symbol_first": false,
1472
+ "format": "%n %u",
1424
1473
  "html_entity": "",
1425
1474
  "decimal_mark": ".",
1426
1475
  "thousands_separator": ",",
@@ -1451,6 +1500,7 @@
1451
1500
  "subunit": "Laari",
1452
1501
  "subunit_to_unit": 100,
1453
1502
  "symbol_first": false,
1503
+ "format": "%n %u",
1454
1504
  "html_entity": "",
1455
1505
  "decimal_mark": ".",
1456
1506
  "thousands_separator": ",",
@@ -1466,6 +1516,7 @@
1466
1516
  "subunit": "Tambala",
1467
1517
  "subunit_to_unit": 100,
1468
1518
  "symbol_first": false,
1519
+ "format": "%n %u",
1469
1520
  "html_entity": "",
1470
1521
  "decimal_mark": ".",
1471
1522
  "thousands_separator": ",",
@@ -1528,6 +1579,7 @@
1528
1579
  "subunit": "Cent",
1529
1580
  "subunit_to_unit": 100,
1530
1581
  "symbol_first": false,
1582
+ "format": "%n %u",
1531
1583
  "html_entity": "$",
1532
1584
  "decimal_mark": ".",
1533
1585
  "thousands_separator": ",",
@@ -1575,6 +1627,7 @@
1575
1627
  "subunit": "Øre",
1576
1628
  "subunit_to_unit": 100,
1577
1629
  "symbol_first": false,
1630
+ "format": "%n %u",
1578
1631
  "html_entity": "kr",
1579
1632
  "decimal_mark": ",",
1580
1633
  "thousands_separator": ".",
@@ -1585,9 +1638,9 @@
1585
1638
  "priority": 100,
1586
1639
  "iso_code": "NPR",
1587
1640
  "name": "Nepalese Rupee",
1588
- "symbol": "",
1641
+ "symbol": "Rs.",
1589
1642
  "disambiguate_symbol": "NPR",
1590
- "alternate_symbols": ["Rs", "रू"],
1643
+ "alternate_symbols": ["Rs", "रू", "₨"],
1591
1644
  "subunit": "Paisa",
1592
1645
  "subunit_to_unit": 100,
1593
1646
  "symbol_first": true,
@@ -1668,6 +1721,7 @@
1668
1721
  "subunit": "Toea",
1669
1722
  "subunit_to_unit": 100,
1670
1723
  "symbol_first": false,
1724
+ "format": "%n %u",
1671
1725
  "html_entity": "",
1672
1726
  "decimal_mark": ".",
1673
1727
  "thousands_separator": ",",
@@ -1714,6 +1768,7 @@
1714
1768
  "subunit": "Grosz",
1715
1769
  "subunit_to_unit": 100,
1716
1770
  "symbol_first": false,
1771
+ "format": "%n %u",
1717
1772
  "html_entity": "z&#322;",
1718
1773
  "decimal_mark": ",",
1719
1774
  "thousands_separator": " ",
@@ -1744,6 +1799,7 @@
1744
1799
  "subunit": "Dirham",
1745
1800
  "subunit_to_unit": 100,
1746
1801
  "symbol_first": false,
1802
+ "format": "%n %u",
1747
1803
  "html_entity": "&#xFDFC;",
1748
1804
  "decimal_mark": ".",
1749
1805
  "thousands_separator": ",",
@@ -1759,6 +1815,7 @@
1759
1815
  "subunit": "Bani",
1760
1816
  "subunit_to_unit": 100,
1761
1817
  "symbol_first": false,
1818
+ "format": "%n %u",
1762
1819
  "html_entity": "",
1763
1820
  "decimal_mark": ",",
1764
1821
  "thousands_separator": ".",
@@ -1789,6 +1846,7 @@
1789
1846
  "subunit": "Kopeck",
1790
1847
  "subunit_to_unit": 100,
1791
1848
  "symbol_first": false,
1849
+ "format": "%n %u",
1792
1850
  "html_entity": "&#x20BD;",
1793
1851
  "decimal_mark": ",",
1794
1852
  "thousands_separator": ".",
@@ -1804,6 +1862,7 @@
1804
1862
  "subunit": "Centime",
1805
1863
  "subunit_to_unit": 1,
1806
1864
  "symbol_first": false,
1865
+ "format": "%n %u",
1807
1866
  "html_entity": "",
1808
1867
  "decimal_mark": ".",
1809
1868
  "thousands_separator": ",",
@@ -1835,6 +1894,7 @@
1835
1894
  "subunit": "Cent",
1836
1895
  "subunit_to_unit": 100,
1837
1896
  "symbol_first": false,
1897
+ "format": "%n %u",
1838
1898
  "html_entity": "$",
1839
1899
  "decimal_mark": ".",
1840
1900
  "thousands_separator": ",",
@@ -1851,6 +1911,7 @@
1851
1911
  "subunit": "Cent",
1852
1912
  "subunit_to_unit": 100,
1853
1913
  "symbol_first": false,
1914
+ "format": "%n %u",
1854
1915
  "html_entity": "&#x20A8;",
1855
1916
  "decimal_mark": ".",
1856
1917
  "thousands_separator": ",",
@@ -1883,6 +1944,7 @@
1883
1944
  "subunit": "Öre",
1884
1945
  "subunit_to_unit": 100,
1885
1946
  "symbol_first": false,
1947
+ "format": "%n %u",
1886
1948
  "html_entity": "",
1887
1949
  "decimal_mark": ",",
1888
1950
  "thousands_separator": " ",
@@ -1915,6 +1977,7 @@
1915
1977
  "subunit": "Penny",
1916
1978
  "subunit_to_unit": 100,
1917
1979
  "symbol_first": false,
1980
+ "format": "%n %u",
1918
1981
  "html_entity": "&#x00A3;",
1919
1982
  "decimal_mark": ".",
1920
1983
  "thousands_separator": ",",
@@ -1945,6 +2008,7 @@
1945
2008
  "subunit": "Cent",
1946
2009
  "subunit_to_unit": 100,
1947
2010
  "symbol_first": false,
2011
+ "format": "%n %u",
1948
2012
  "html_entity": "",
1949
2013
  "decimal_mark": ".",
1950
2014
  "thousands_separator": ",",
@@ -1960,6 +2024,7 @@
1960
2024
  "subunit": "Cent",
1961
2025
  "subunit_to_unit": 100,
1962
2026
  "symbol_first": false,
2027
+ "format": "%n %u",
1963
2028
  "html_entity": "",
1964
2029
  "decimal_mark": ".",
1965
2030
  "thousands_separator": ",",
@@ -1976,6 +2041,7 @@
1976
2041
  "subunit": "Cent",
1977
2042
  "subunit_to_unit": 100,
1978
2043
  "symbol_first": false,
2044
+ "format": "%n %u",
1979
2045
  "html_entity": "",
1980
2046
  "decimal_mark": ".",
1981
2047
  "thousands_separator": ",",
@@ -1992,6 +2058,7 @@
1992
2058
  "subunit": "piaster",
1993
2059
  "subunit_to_unit": 100,
1994
2060
  "symbol_first": false,
2061
+ "format": "%n %u",
1995
2062
  "html_entity": "&#x00A3;",
1996
2063
  "decimal_mark": ".",
1997
2064
  "thousands_separator": ",",
@@ -2007,6 +2074,7 @@
2007
2074
  "subunit": "Cêntimo",
2008
2075
  "subunit_to_unit": 100,
2009
2076
  "symbol_first": false,
2077
+ "format": "%n %u",
2010
2078
  "html_entity": "",
2011
2079
  "decimal_mark": ".",
2012
2080
  "thousands_separator": ",",
@@ -2037,6 +2105,7 @@
2037
2105
  "subunit": "Piastre",
2038
2106
  "subunit_to_unit": 100,
2039
2107
  "symbol_first": false,
2108
+ "format": "%n %u",
2040
2109
  "html_entity": "&#x00A3;",
2041
2110
  "decimal_mark": ".",
2042
2111
  "thousands_separator": ",",
@@ -2082,6 +2151,7 @@
2082
2151
  "subunit": "Diram",
2083
2152
  "subunit_to_unit": 100,
2084
2153
  "symbol_first": false,
2154
+ "format": "%n %u",
2085
2155
  "html_entity": "",
2086
2156
  "decimal_mark": ".",
2087
2157
  "thousands_separator": ",",
@@ -2097,6 +2167,7 @@
2097
2167
  "subunit": "Tenge",
2098
2168
  "subunit_to_unit": 100,
2099
2169
  "symbol_first": false,
2170
+ "format": "%n %u",
2100
2171
  "html_entity": "",
2101
2172
  "decimal_mark": ".",
2102
2173
  "thousands_separator": ",",
@@ -2112,6 +2183,7 @@
2112
2183
  "subunit": "Millime",
2113
2184
  "subunit_to_unit": 1000,
2114
2185
  "symbol_first": false,
2186
+ "format": "%n %u",
2115
2187
  "html_entity": "",
2116
2188
  "decimal_mark": ".",
2117
2189
  "thousands_separator": ",",
@@ -2158,6 +2230,7 @@
2158
2230
  "subunit": "Cent",
2159
2231
  "subunit_to_unit": 100,
2160
2232
  "symbol_first": false,
2233
+ "format": "%n %u",
2161
2234
  "html_entity": "$",
2162
2235
  "decimal_mark": ".",
2163
2236
  "thousands_separator": ",",
@@ -2204,6 +2277,7 @@
2204
2277
  "subunit": "Kopiyka",
2205
2278
  "subunit_to_unit": 100,
2206
2279
  "symbol_first": false,
2280
+ "format": "%n %u",
2207
2281
  "html_entity": "&#x20B4;",
2208
2282
  "decimal_mark": ".",
2209
2283
  "thousands_separator": ",",
@@ -2219,6 +2293,7 @@
2219
2293
  "subunit": "Cent",
2220
2294
  "subunit_to_unit": 1,
2221
2295
  "symbol_first": false,
2296
+ "format": "%n %u",
2222
2297
  "html_entity": "",
2223
2298
  "decimal_mark": ".",
2224
2299
  "thousands_separator": ",",
@@ -2245,12 +2320,12 @@
2245
2320
  "priority": 100,
2246
2321
  "iso_code": "UYU",
2247
2322
  "name": "Uruguayan Peso",
2248
- "symbol": "$",
2323
+ "symbol": "$U",
2249
2324
  "alternate_symbols": ["$U"],
2250
2325
  "subunit": "Centésimo",
2251
2326
  "subunit_to_unit": 100,
2252
2327
  "symbol_first": true,
2253
- "html_entity": "&#x20B1;",
2328
+ "html_entity": "$U",
2254
2329
  "decimal_mark": ",",
2255
2330
  "thousands_separator": ".",
2256
2331
  "iso_numeric": "858",
@@ -2265,6 +2340,7 @@
2265
2340
  "subunit": "Tiyin",
2266
2341
  "subunit_to_unit": 100,
2267
2342
  "symbol_first": false,
2343
+ "format": "%n %u",
2268
2344
  "html_entity": "",
2269
2345
  "decimal_mark": ".",
2270
2346
  "thousands_separator": ",",
@@ -2295,6 +2371,7 @@
2295
2371
  "subunit": "Hào",
2296
2372
  "subunit_to_unit": 1,
2297
2373
  "symbol_first": false,
2374
+ "format": "%n %u",
2298
2375
  "html_entity": "&#x20AB;",
2299
2376
  "decimal_mark": ",",
2300
2377
  "thousands_separator": ".",
@@ -2326,6 +2403,7 @@
2326
2403
  "subunit": "Sene",
2327
2404
  "subunit_to_unit": 100,
2328
2405
  "symbol_first": false,
2406
+ "format": "%n %u",
2329
2407
  "html_entity": "",
2330
2408
  "decimal_mark": ".",
2331
2409
  "thousands_separator": ",",
@@ -2336,12 +2414,13 @@
2336
2414
  "priority": 100,
2337
2415
  "iso_code": "XAF",
2338
2416
  "name": "Central African Cfa Franc",
2339
- "symbol": "Fr",
2417
+ "symbol": "CFA",
2340
2418
  "disambiguate_symbol": "FCFA",
2341
2419
  "alternate_symbols": ["FCFA"],
2342
2420
  "subunit": "Centime",
2343
2421
  "subunit_to_unit": 1,
2344
2422
  "symbol_first": false,
2423
+ "format": "%n %u",
2345
2424
  "html_entity": "",
2346
2425
  "decimal_mark": ".",
2347
2426
  "thousands_separator": ",",
@@ -2358,6 +2437,7 @@
2358
2437
  "subunit": "oz",
2359
2438
  "subunit_to_unit": 1,
2360
2439
  "symbol_first": false,
2440
+ "format": "%n %u",
2361
2441
  "html_entity": "",
2362
2442
  "decimal_mark": ".",
2363
2443
  "thousands_separator": ",",
@@ -2373,6 +2453,7 @@
2373
2453
  "subunit": "oz",
2374
2454
  "subunit_to_unit": 1,
2375
2455
  "symbol_first": false,
2456
+ "format": "%n %u",
2376
2457
  "html_entity": "",
2377
2458
  "decimal_mark": ".",
2378
2459
  "thousands_separator": ",",
@@ -2388,6 +2469,7 @@
2388
2469
  "subunit": "",
2389
2470
  "subunit_to_unit": 1,
2390
2471
  "symbol_first": false,
2472
+ "format": "%n %u",
2391
2473
  "html_entity": "",
2392
2474
  "decimal_mark": ".",
2393
2475
  "thousands_separator": ",",
@@ -2403,6 +2485,7 @@
2403
2485
  "subunit": "",
2404
2486
  "subunit_to_unit": 1,
2405
2487
  "symbol_first": false,
2488
+ "format": "%n %u",
2406
2489
  "html_entity": "",
2407
2490
  "decimal_mark": ".",
2408
2491
  "thousands_separator": ",",
@@ -2418,6 +2501,7 @@
2418
2501
  "subunit": "",
2419
2502
  "subunit_to_unit": 1,
2420
2503
  "symbol_first": false,
2504
+ "format": "%n %u",
2421
2505
  "html_entity": "",
2422
2506
  "decimal_mark": ".",
2423
2507
  "thousands_separator": ",",
@@ -2433,6 +2517,7 @@
2433
2517
  "subunit": "",
2434
2518
  "subunit_to_unit": 1,
2435
2519
  "symbol_first": false,
2520
+ "format": "%n %u",
2436
2521
  "html_entity": "",
2437
2522
  "decimal_mark": ".",
2438
2523
  "thousands_separator": ",",
@@ -2463,6 +2548,7 @@
2463
2548
  "subunit": "",
2464
2549
  "subunit_to_unit": 1,
2465
2550
  "symbol_first": false,
2551
+ "format": "%n %u",
2466
2552
  "html_entity": "$",
2467
2553
  "decimal_mark": ".",
2468
2554
  "thousands_separator": ",",
@@ -2478,6 +2564,7 @@
2478
2564
  "subunit": "Centime",
2479
2565
  "subunit_to_unit": 1,
2480
2566
  "symbol_first": false,
2567
+ "format": "%n %u",
2481
2568
  "html_entity": "",
2482
2569
  "decimal_mark": ".",
2483
2570
  "thousands_separator": ",",
@@ -2494,6 +2581,7 @@
2494
2581
  "subunit": "oz",
2495
2582
  "subunit_to_unit": 1,
2496
2583
  "symbol_first": false,
2584
+ "format": "%n %u",
2497
2585
  "html_entity": "",
2498
2586
  "decimal_mark": ".",
2499
2587
  "thousands_separator": ",",
@@ -2508,6 +2596,7 @@
2508
2596
  "subunit": "Centime",
2509
2597
  "subunit_to_unit": 1,
2510
2598
  "symbol_first": false,
2599
+ "format": "%n %u",
2511
2600
  "html_entity": "",
2512
2601
  "decimal_mark": ".",
2513
2602
  "thousands_separator": ",",
@@ -2523,6 +2612,7 @@
2523
2612
  "subunit": "",
2524
2613
  "subunit_to_unit": 1,
2525
2614
  "symbol_first": false,
2615
+ "format": "%n %u",
2526
2616
  "html_entity": "",
2527
2617
  "decimal_mark": ".",
2528
2618
  "thousands_separator": ",",
@@ -2538,6 +2628,7 @@
2538
2628
  "subunit": "",
2539
2629
  "subunit_to_unit": 1,
2540
2630
  "symbol_first": false,
2631
+ "format": "%n %u",
2541
2632
  "html_entity": "",
2542
2633
  "decimal_mark": ".",
2543
2634
  "thousands_separator": ",",
@@ -2553,6 +2644,7 @@
2553
2644
  "subunit": "Fils",
2554
2645
  "subunit_to_unit": 100,
2555
2646
  "symbol_first": false,
2647
+ "format": "%n %u",
2556
2648
  "html_entity": "&#xFDFC;",
2557
2649
  "decimal_mark": ".",
2558
2650
  "thousands_separator": ",",
@@ -2584,6 +2676,7 @@
2584
2676
  "subunit": "Ngwee",
2585
2677
  "subunit_to_unit": 100,
2586
2678
  "symbol_first": false,
2679
+ "format": "%n %u",
2587
2680
  "html_entity": "",
2588
2681
  "decimal_mark": ".",
2589
2682
  "thousands_separator": ",",