-
Notifications
You must be signed in to change notification settings - Fork 393
Fix prefix abbrevs #421
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
Fix prefix abbrevs #421
Conversation
Interesting change. What is a GBTU? [Wikipedia](https://en.wikipedia.org/wiki/British_thermal_unit#:~:text=The%20British%20thermal%20unit%20(Btu,water%20by%20one%20degree%20Fahrenheit) My understanding is that mmBTU is one million BTU's. This is often used as the energy of a large volume of gas for example has a very large BTU value and for us humans to better relate we need to divide by one million so that it makes comparison much easier (is this now a mix between metric and imperial?) For example, 1 tonne of LNG gas is 51.7 mmBTU or 51,700,000 BTU. I would like to use this library however my users will not be typing GBTU they will be using mmBTU, is there a way to extend the acronyms? p.s. congratulations on a very interesting library |
@d-barker At least MBTU (1,000 BTUs) is problematic, because it is ambiguous with the metric Mega (1,000,000 BTUs) and kBTU (1,000 BTUs) is also used in some domains. From wiki:
Back to your question, yes, we should be able to add back support for If you would be interested in doing a pull request, I see two ways of adding it: Option 1 - Add an extra abbreviation to the unitAdd , by adding this override:
Option 2 - Add an entirely new unit for mmBTUWe could add a new unit |
Thanks for the detailed reply, I will have a look at your suggested changes. I am away on leave for a couple of weeks so will have a look when I am back. |
Fixes several wrong abbreviations.
Removes redundant prefix abbreviations (
k
,M
etc is prefixed by default for kilo, mega etc.)Breaking changes
GigabritishThermalUnit:
mmBTU
=>GBTU
MegabritishThermalUnit:
mBTU
=>MBTU
Kilopound:
KLbs
=>klb
(neither is commonly used)Megapound:
MLbs
=>Mlb
(neither is commonly used)