Skip to content

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

Open
@hshercha

Description

@hshercha

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions