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

Singular Long Name Not Used for Single Values #10

Open
stiefeljackal opened this issue Aug 28, 2024 · 1 comment · May be fixed by #11
Open

Singular Long Name Not Used for Single Values #10

stiefeljackal opened this issue Aug 28, 2024 · 1 comment · May be fixed by #11

Comments

@stiefeljackal
Copy link

In the current version (0.1.12 as of writing) of Elements.Quantity, the singular form of the long name of a unit is not used for single values. The following PowerShell demonstrates the bug:

# PowerShell

Add-Type -Path "Z:\Path\To\Elements.Quantity.dll" # Path to DLL varies
$dayUnit = [Elements.Quantity.Time]::Day
$time = New-Object Elements.Quantity.Time -ArgumentList @( $dayUnit.Ratio  )
[Elements.Quantity.QuantityHelper]::FormatAs[Elements.Quantity.Time]($time, $dayUnit, "0.#", $true)
 
# Expected: 1 day
# Actual: 1 days 
image

Since Resonite utilizes Elements.Quantity, the same bug occurs there as well:

image

It was also shown in Yellow-Dog-Man/Resonite-Issues#768 as well.

I have a PR that should address this issue; it will be posted shortly.

@stiefeljackal stiefeljackal linked a pull request Aug 28, 2024 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.

2 participants
@stiefeljackal and others