Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format_percent doesn't return trailing decimal zeros with precision #893

Open
hshercha opened this issue Jul 8, 2022 · 1 comment · May be fixed by #1058
Open

format_percent doesn't return trailing decimal zeros with precision #893

hshercha opened this issue Jul 8, 2022 · 1 comment · May be fixed by #1058

Comments

@hshercha
Copy link

hshercha commented Jul 8, 2022

Overview Description

Even when decimal_quantization=False, format_percent doesn't return decimal zeros with precision. Is it possible to include another flag to specify the number of precision values? We are using this for localizing interest rates.

Steps to Reproduce

  1. Call format_percent with any number that would yield a whole number.

Actual Results

format_percent(0.23, locale=en_US, decimal_quantization=False) -> 23%
format_percent(0.234, locale=en_US, decimal_quantization=False) -> 23.4%

Expected Results

format_percent(0.23, locale=en_US, decimal_quantization=False) -> 23.00%
format_percent(0.234, locale=en_US, decimal_quantization=False) -> 23.40%

Reproducibility

Additional Information

@hshercha
Copy link
Author

hshercha commented Jul 8, 2022

This is more of a feature request than a bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant