You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
format_compact_decimal ignores fraction_digits below the smallest compact magnitude #1484
format_compact_decimal and format_compact_currency ignore fraction_digits below the smallest compact magnitude and on a "0" pattern. Both docstrings say it "Defaults to 0" (babel/numbers.py:636, :922).
Steps to Reproduce
python scripts/download_import_cldr.py on master at aeca9fa.
Neither the fallback (babel/numbers.py:644-652) nor the "0" branch (line 680) rounds, though #909 set decimal_quantization=False there assuming the number is always rounded (#909 (comment)). Rounding prints $0.123 as $0 by default, as at 1K; fraction_digits=2 keeps cents. Should I open a pull request that rounds in both paths?
Activity