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

Minimum and maximum length for mantissa #609

Open
DavidHall opened this issue May 26, 2021 · 0 comments · May be fixed by #639
Open

Minimum and maximum length for mantissa #609

DavidHall opened this issue May 26, 2021 · 0 comments · May be fixed by #639

Comments

@DavidHall
Copy link

Is it possible to specify a format with a minimum and maximum number of decimal places?

Some example inputs and outputs (for minimum 2, maximum 4):

1000 => 1000.00
1000.1 => 1000.10
1000.123 => 1000.123
1000.1234 => 1000.1234

Ideal would be to optionally allow just the minimum, so with minimum 2
1000.1 => 1000.10
1000.1234567 => 1000.1234567

I've tried this with the old style format string, but it doesn't appear to work (I'm using thousand separators, but that doesn't appear to make a difference when they are removed)

0,0.00[0000]

ShayanEmzed added a commit to ShayanEmzed/numbro that referenced this issue Feb 4, 2022
@ShayanEmzed ShayanEmzed linked a pull request Feb 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant