-
Notifications
You must be signed in to change notification settings - Fork 401
Added "Deca", "Deci" and "Hecto" prefixes for "UsGallon" unit with tests #779
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
Changes from all commits
fbfdb00
121f6c0
6064445
a09f66b
38f7f76
5aa9472
1c4614e
5c7bb61
6eb6688
5e0903b
15baeef
eb03a6d
3328370
38801de
56d4a5e
22c2df0
51cc39b
0f8c226
9bbcab5
fb8f405
b3f4b7e
997a383
b83b8d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mentioned reports using 'cGal'/'100 Gal' and 'kGal'/'1000 Gal'.
Please note:
ToString()
will in this PR bedgal (U.S.)
andhgal (U.S.)
etc.Volume.Parse("5 cGal (U.S.)")
will throw an exception, because parsing is currently case sensitive.If you really want
ToString()
andParse()
to support using uppercaseGal
, then you need to add thatGal (U.S.)
abbreviation to the end of theAbbreviations
array below. It would still need the(U.S.)
suffix to be consistent with our naming conventions though..To use a specific abbreviation in
ToString()
, take a look at custom string formatting.If you are fine with the existing lowercase
gal (U.S.)
abbreviation, then I recommend not addingGal (U.S.)
unless it will actually be used.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#781 is now merged, so this is point is no longer relevant :-) This PR is then good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@angularsen Sorry for delay with my reply. You see, in our system exists a few different names for the same unit. First company names it "kGal", the second - "100 Gal", the third - "Hundred Gallons" and so on. Thus I don't think that there is any standard name of those units in the States, and if there is actually one, looks like no one really respects it. So I would leave it as it is now. :-)