]> git.ipfire.org Git - thirdparty/babel.git/commit
numbers: Use currency decimal digits by default
authorIsaac Jurado <diptongo@gmail.com>
Mon, 17 Nov 2014 17:24:47 +0000 (18:24 +0100)
committerIsaac Jurado <diptongo@gmail.com>
Sun, 27 Sep 2015 12:47:32 +0000 (14:47 +0200)
commit201ed50bc0d8a7baf332eb0596d3c2ac944b7b43
tree0a007d04c7900c4f1a1922565e4e84c360723141
parentf7673904a17cbbd4a661a00642602d6b5bb597a7
numbers: Use currency decimal digits by default

When formatting a price, the number of decimals to use should be defined
by the currency.  For example, JPY do not use decimal numbers at all.

However, we still allow the user to override the currency decimal digits
setting with the one from the number format.

Fixes https://github.com/mitsuhiko/babel/issues/139
babel/numbers.py
tests/test_numbers.py