Skip to content

Add minDecimals to output of getFormatInfo() - #79

Open
yelper wants to merge 2 commits into
borgar:masterfrom
yelper:dev/alsarika/add-min-decimals-info
Open

Add minDecimals to output of getFormatInfo()#79
yelper wants to merge 2 commits into
borgar:masterfrom
yelper:dev/alsarika/add-min-decimals-info

Conversation

@yelper

@yelper yelper commented Aug 28, 2026

Copy link
Copy Markdown

I found that when I was trying to use getFormatInfo() to get metadata about formats that "0.0" and "0.#", the info function returned the exact same FormatInfo objects.

To differentiate them, I thought it was natural to support a minDecimals property as part of FormatInfo. This PR adds the ability to return this metadata.

Supporting something like minDecimals would help pass correct downstream information to other functionality, like compaction of numbers using something like Intl.NumberFormat, setting minimumFractionDigits and maximumFractionDigits (see MDN).

AI note: I used GPT 5.4 Sol to initially author the PR, but then personally reviewed all code/doc changes.

yelper and others added 2 commits August 28, 2026 12:12
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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 this pull request may close these issues.

1 participant